Merge "Docs: Fixed info about spanning multiple columns" into nyc-docs

This commit is contained in:
Hemal Patel
2016-08-04 19:38:41 +00:00
committed by Android (Google) Code Review

View File

@@ -23,17 +23,32 @@ displays child {@link android.view.View} elements in rows and columns.</p>
<img src="{@docRoot}images/ui/gridlayout.png" alt="" /> <img src="{@docRoot}images/ui/gridlayout.png" alt="" />
<p>{@link android.widget.TableLayout} positions its children into rows <p>
and columns. TableLayout containers do not display border lines for their rows, columns, {@link android.widget.TableLayout} positions its children into rows and
or cells. The table will have as many columns as the row with the most cells. A table can leave columns. TableLayout containers do not display border lines for their rows,
cells empty, but cells cannot span columns, as they can in HTML.</p> columns, or cells. The table will have as many columns as the row with the
<p>{@link android.widget.TableRow} objects are the child views of a TableLayout most cells. A table can leave cells empty. Cells can span multiple columns,
(each TableRow defines a single row in the table). as they can in HTML. You can span columns by using the <code>span</code>
Each row has zero or more cells, each of which is defined by any kind of other View. So, the cells of a row may be field in the {@link android.widget.TableRow.LayoutParams} class.
composed of a variety of View objects, like ImageView or TextView objects. </p>
A cell may also be a ViewGroup object (for example, you can nest another TableLayout as a cell).</p>
<p>The following sample layout has two rows and two cells in each. The accompanying screenshot shows the <p class="note">
result, with cell borders displayed as dotted lines (added for visual effect). </p> <strong>Note:</strong> Cells cannot span multiple rows.
</p>
<p>
{@link android.widget.TableRow} objects are the child views of a TableLayout
(each TableRow defines a single row in the table). Each row has zero or more
cells, each of which is defined by any kind of other View. So, the cells of
a row may be composed of a variety of View objects, like ImageView or
TextView objects. A cell may also be a ViewGroup object (for example, you
can nest another TableLayout as a cell).
</p>
<p>
The following sample layout has two rows and two cells in each. The
accompanying screenshot shows the result, with cell borders displayed as
dotted lines (added for visual effect).
</p>
<table class="columns"> <table class="columns">
<tr> <tr>