Google

Wednesday, July 7, 2010

Android Programming


1. First create the UI elements with XML




2. Then, retrieve the UI elements and program the logic in Java



3. Output - When ToggleButton or CheckBox is clicked, the TextView is updated with a string

Note:
What you design in the main.xml file must be saved and built so that the R.java file is built.
R.java converts the XML into java binary so that it can be accessed in the Activity.java source code (which is the main).