diff options
| author | 2016-08-02 18:16:13 -0700 | |
|---|---|---|
| committer | 2016-08-03 14:28:38 -0700 | |
| commit | 64e88cd296786ffcbca7bc311d8c138a8a67edf8 (patch) | |
| tree | ff60b08df0d771b86d76d22595ce0c3243ecf375 | |
| parent | 9684f2cd2fe764338826cf921fd2d328699947db (diff) | |
Docs: Fixed info about spanning multiple columns
Corrected the information related to the spanning of multiple columns.
As per the reference documentation, cells can span multiple columns. Added
information about how to span multiple columns and provided a reference
link for more details.
Bug: 24760839
Change-Id: I32d51d27db94f61dfa83f7fe1fe94ca58708a2d0
| -rw-r--r-- | docs/html/guide/topics/ui/layout/grid.jd | 37 |
1 files changed, 26 insertions, 11 deletions
diff --git a/docs/html/guide/topics/ui/layout/grid.jd b/docs/html/guide/topics/ui/layout/grid.jd index 31f9b9ca4ead..cc536517ea09 100644 --- a/docs/html/guide/topics/ui/layout/grid.jd +++ b/docs/html/guide/topics/ui/layout/grid.jd @@ -23,17 +23,32 @@ displays child {@link android.view.View} elements in rows and columns.</p> <img src="{@docRoot}images/ui/gridlayout.png" alt="" /> -<p>{@link android.widget.TableLayout} positions its children into rows - and columns. TableLayout containers do not display border lines for their rows, columns, - or cells. The table will have as many columns as the row with the most cells. A table can leave -cells empty, but cells cannot span columns, as they can in HTML.</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> +<p> + {@link android.widget.TableLayout} positions its children into rows and + columns. TableLayout containers do not display border lines for their rows, + columns, or cells. The table will have as many columns as the row with the + most cells. A table can leave cells empty. Cells can span multiple columns, + as they can in HTML. You can span columns by using the <code>span</code> + field in the {@link android.widget.TableRow.LayoutParams} class. +</p> + +<p class="note"> + <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"> <tr> |