Table Layout arranges its children in a HTML-style grid. It's a bit like the AWT
Grid Layout class, but with much more flexibility. Unlike most other layout classes in Android,
Table Layout uses its own specialized direct-child
View class, named
Table Row. The
Table Layout class also doesn't allow you to define the number of rows or columns (making it far more like an HTML
<table> element). Instead, the number of rows and columns is calculated by the number of widgets in the
Table Layout and its
Table Row children.
A cell in a
Table Layout may consume any number of rows and columns, although the default for a
View placed inside a
Table Row is to take up exactly a single table cell. However, if you place a
View as a direct child ...