CHAPTER 8: Android UI Design: Using Advanced ViewGroup Layout Containers 275
Let’s preview the new useDefaultMargins global GridLayout parameter by clicking the Graphical
Layout Editor tab to “render” our GridLayout UI design’s parameters visually. You can see the visual
layout result in Figure 8-8, along with the green grid guides (toggle icon) turned on, to allow us to
visualize these auto-margins much better!
As you can see in Figure 8-8, the result of this global (parent) margin spacing parameter is to more
evenly space the UI design out, relative to the sides of the screen (the X dimension), as well as in the
Y dimension (top to bottom), between the UI elements themselves, so we’ll leave this parameter in
place, and start to take a look at UI widget order and layout orientation next.
Figure 8-7. Add the android:useDefaultMargins parameter to the
Figure 8-8. Click the Graphical Layout Editor tab and observe an improved GridLayout design (margin) alignment