March 2013
Beginner to intermediate
580 pages
16h 11m
English
Create a new Android XML layout file named fragment_hello_moon.xml. Make its root element a TableLayout.
Use Figure 13.4 to flesh out fragment_hello_moon.xml.
Figure 13.4 Layout diagram for HelloMoon

TableLayout works a lot like a LinearLayout. Instead of nesting LinearLayouts, you can arrange widgets using TableRows. TableLayout and TableRow can team up to make it easier to arrange views in neat columns. Here, TableLayout helps arrange your buttons side by side in equally sized columns.
Why is the ImageView not in a TableRow? Children of TableRow act like “cells” of a table. Your goal here is for the ...
Read now
Unlock full access