The properties that tablelayout often use are:
1.android:collapsecolumns: Hides the specified column in the No. 0 order: android:collapsecolumns=0,2 means to hide the No. 0 and 2nd columns
2.android:shrinkcolumns: In the No. 0 order, automatically extends the specified column to fill the available parts: when the layoutrow inside the control is not covered with layout, Shrinkcolumns does not work, set the shrinkcolumns= 0,1,2, the layout has not changed at all, because there is enough space left in the Layoutrow. When the layoutrow is filled with controls, shrinkcolumns=2 is set, and the control automatically fills the space vertically
3.android:stretchcolumns: With the No. 0 action order, try to fill the specified column with blank parts: Set Stretchcolumns=1, then the 1th column is filled as far as possible (BUTTON02 and TextView02 are filled to the right, Until TEXTVIEW03 is squeeze to the last side).
Tablelayout and Tablelayout is a set of collocation layout, Tablelayout Bottom, TableRow on the top of Tablelayout, and button, TextView and other controls on the TableRow, in addition, Controls can also be placed on top of tablelayout. Tablelayout is a complex layout, the simplest use is simply to drag the control to make an interface, but in fact, often in the code to use the Tablelayout, for example, to make a table effect. This article mainly introduces the basic use method of Tablelayout.
The properties that tablelayout often use are:
Android:collapsecolumns: Hides the specified column in the No. 0 action order:
Android:collapsecolumns when this property is empty, such as:
The android:collapsecolumns=0,2--------------"means to remove the No. 0 and 2nd columns, such as:
Android:shrinkcolumns: In the No. 0 order, automatically extends the specified column to fill the available parts:
Shrinkcolumns does not work when the controls inside the Layoutrow are not covered by the layout, such as:
Set the shrinkcolumns=0,1,2, the layout has not changed completely, because there is still enough space in the Layoutrow.
When the layoutrow is covered with controls, such as:
Setting shrinkcolumns=2, the result is that the control automatically fills the space in the vertical direction:
Android:stretchcolumns: With the No. 0 action order, fill in the blanks with the specified columns as much as possible:
If you set Stretchcolumns=1, the result is that the 1th column is populated as far as possible (BUTTON02 and TextView02 are padded to the right until TextView03 is squeeze to the last edge).
Android Tablelayout + TableRow, though