Difference between revisions of "Basic Android"
esse quam videri
(→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
- Install 32 bit Java JDK http://www.oracle.com/technetwork/java/javase/downloads/index.html
- App Inventor Pretty basic web interface an blocks editor to build simple android apps http://appinventor.googlelabs.com/about/
- Setup App Inventor http://appinventor.googlelabs.com/learn/setup/
- Android SDK
- http://developer.android.com/sdk/index.html
- Install SDK Installer http://developer.android.com/sdk/tools-notes.html
- Install Eclipse http://www.eclipse.org/downloads/
- Install Eclipse ADT Plugin http://developer.android.com/sdk/eclipse-adt.html#installing
- Android NDK
- we're not covering this http://developer.android.com/sdk/ndk/index.html
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