Changing the Widget Order Inside of the GridLayout
If you had originally designed the Edit Galaxy Info UI by using nested tags, all of
the UI elements would have been grouped together in a (left side) vertical LinearLayout
and all of the
Figure 8-9. Changing the order of the UI widgets to group all of the and
Let’s simulate this “grouped UI widget type” collection of widgets inside of the
container and see if the child widget order changes how the GridLayout engine will auto-arrange
the grid UI design. If it does, we will then ascertain if there are any “global” parameters which you
can add into your parent tag, in order to “correct” this new alignment back into the
EditText fields on the left, Buttons on the right, result which we are looking to achieve. This exercise
will allow you to better visualize how the GridLayout algorithm actually works!
To create this alternate UI widget order seen in Figure 8-9, you need to cut and paste the first three