Difference between revisions of "Basic Android"

esse quam videri
Jump to: navigation, search
(Activities)
Line 33: Line 33:
  
 
Activity life cycle http://developer.android.com/guide/topics/fundamentals/activities.html#Lifecycle
 
Activity life cycle http://developer.android.com/guide/topics/fundamentals/activities.html#Lifecycle
 +
 +
Get an instance of an object from the R class
 +
notice the cast to the type
 +
<java>Button btn = (Button)this.findViewById(R.id.button1);
 +
</java>
  
 
==Events==
 
==Events==

Revision as of 16:41, 19 July 2011


Android Basics

Basics

  • src folder containg all the source
  • res folder containing all the resources

Resources

No DPI or PPI Andoid uses dp density independent pixels or sp scale interdependent pixels http://developer.android.com/guide/topics/resources/more-resources.html#Dimension

also see supporting multiple screens http://developer.android.com/guide/practices/screens_support.html

Activities

Activity life cycle http://developer.android.com/guide/topics/fundamentals/activities.html#Lifecycle

Get an instance of an object from the R class

notice the cast to the type

<java>Button btn = (Button)this.findViewById(R.id.button1); </java>

Events

Lots more good reading http://developer.android.com/guide/topics/fundamentals.html


This text will be replaced