Contents xi
Coding Galaxy Objects: Constructor Method 158
Creating Galaxy Functions: Coding Your Methods 158
Creating a Java Class in Eclipse: Galaxyjava 160
Coding Your Galaxyjava Class with Eclipse ADT 163
Summary 164
■ Chapter 6: Android Screen Design: Writing to the Display Using Activity and View ����� 167
How Activity, View, and ViewGroup Relate 168
The ViewGroup Class: A Subclass of View 170
Customizing Your UI Design: Galaxy Screen 172
Eclipse Clean Project: Sanitizing Your Project 173
Using the Galaxy Class: Creating a Galaxy Object 175
Using LinearLayout: Creating Linear UI Designs 180
Using Digital Imagery: Adding a Galaxy Background 186
Creating UI Contrast: The TextView Color Parameter 189
Nested LinearLayout Containers: Creating a More Complex UI 190
Interfacing with UI Elements: The ID Parameter 196
Creating Modular Code: createDefaultGalaxy( ) 197
Updating the UI in Java: Using UI Objects 198
A UI Instantiation Method: createUiTextViews( ) 200
Creating the transferDataValues( ) Method 202
Testing and Debugging your Application 206
Using the LogCat 207
Summary 211
■ Chapter 7: Making Apps Interactive: Intents, Event Handling, and Menus �������������������� 213
The Menu Class and Interface: Android Menus 214
Designing Menus in XML Using <menu> and <item> 215
AVD Is Not Starting App: Using the Eclipse AVD Manager 217
Inflating the Menu: onCreateOptionsMenu( ) 219
The MenuItem Class: onOptionsItemSelected( ) 220
The Java Switch Statement: Choosing a MenuItem 222
Using Intent Objects: The Android Intent Class 224