A (175)

(Tuis.) #1
CHAPTER 7: Making Apps Interactive: Intents, Event Handling, and Menus 245

It is important to note that you could also alternatively reference the layout_alignLeft parameter to
the EditText ID of the EditText UI element above it (@+id/edit_pop), since that EditText UI element
has already “inherited” the positioning from the edit_colony EditText UI widget’s positioning. You can
apply the same principle to the layout_alignLeft parameter for the third Button UI element; it could
either reference the @+id/submit_colony or the @+id/submit_pop as both of these references will
produce the same left-side Button alignment result.


Now click on the Graphical Layout Editor tab and preview the UI design, which can be seen in
Figure 7-30. As you can see, the UI design does not look professional, as the alignment of the
EditView UI elements and the Button UI elements is getting worse as we move from the top of the
design to the bottom.


Figure 7-29. Adding the third child tag and using RelativeLayout alignment to align it below edit_pop

Free download pdf