January 2014
Intermediate to advanced
736 pages
70h 43m
English
Recall that layouts arrange views in a GUI. A LinearLayout (package android.widget) arranges views either horizontally (the default) or vertically and can size its views proportionally. We’ll use this to arrange two TextViews horizontally and ensure that each uses half of the available horizontal space.
GridLayout (package android.widget) was introduced in Android 4.0 as a new layout for arranging views into cells in a rectangular grid. Cells can occupy multiple rows and columns, allowing for complex layouts. In many cases, GridLayout can be used to replace the older, and sometimes less efficient TableLayout, which arranges views into rows and columns where each row is typically defined ...
Read now
Unlock full access