240 CHAPTER 7: Making Apps Interactive: Intents, Event Handling, and Menus
If you toggle over into Graphical Layout mode (view), shown in Figure 7 -2 3 , you will see a drastic
change in your UI layout design, which has just become an order of magnitude more professional in its
appearance than it was before you added the hint and Button text label string constant value references.
This great-looking result was achieved by using only one RelativeLayout toRightOf reference, and if we
only had one EditText and Button UI element in the design, this would be a relatively (no pun intended)
simple UI design. However, we have another half-dozen UI elements to incorporate into this UI design,
not to mention some cool background image work that we will need to do to make this UI design match
up with the “visual wow factor” within our MainActivity UI screen design.
Figure 7-23. Previewing the configured
Before we get into the fun part of “skinning” the UI design using graphics assets, we need to
continue learning some more RelativeLayout positioning and alignment parameters, as well as
adding the EditGalaxy class to the AndroidManifest.xml file. You will need to do this at some point,
so that your app will not crash when you decide to preview it inside of the Nexus One AVD emulator,
by clicking on your “Edit Galaxy Info” MenuItem option.
Aligning Several UI Elements Using RelativeLayout Parameters
Now let’s ratchet up the RelativeLayout complexity by adding in EditText and Button UI widgets
for the Galaxy object Population, Fleets, and Starships characteristics, and align all of these UI
elements relative to one another, so that you can gain valuable experience with some of the other
RelativeLayout parameters, such as android:layout_below and android:layout_alignLeft, for
instance, which you are about to implement next.
To duplicate the first