256 CHAPTER 7: Making Apps Interactive: Intents, Event Handling, and Menus
Make sure that you use the Double.parseDouble( ) method call with your galaxyLifeforms variable,
and be sure to use the Integer.parseInt( ) method call with your galaxyFleets and galaxyStarships
variables. This is so that you make sure that you are matching up your numeric data types with the
proper .parse( ) method call data type.
As you can see in Figure 7-40, your code runs well in the Nexus One emulator, and your numeric
entries have good contrast, using the white text color and white hint color values.
Figure 7-39. Set the Galaxy object data fields equal to the EditText object data fields using .getText( ) and .parse( )
Figure 7-40. Enter new data values into the EditText UI elements and click Button UI elements to call .onClick( )