Chapter     14

Android’s GridLayout Class: UI Design Using a Grid-based Layout

The Android GridLayout class is a fairly recent addition to the Android OS in the Ice Cream Sandwich Version 4.0 release. Although RelativeLayout can be used to create grid-like UI designs, enough developers were using grid-like UI designs that Android developers decided to go ahead and create the GridLayout (ViewGroup subclass) user interface layout container class.

The GridLayout class is optimized specifically for creating grid UI design using a minimal amount of system memory, and can render both horizontal UI element and vertical UI element alignment at the same time in the same UI.

Although Android’s GridLayout has half the number of parameters (12 versus 24) ...

Get Pro Android UI now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.