Introduction to common properties of tablelayout in Android Development Notes

Tablelayout frequently uses the following attributes:

Android: columnsecolumns: hide the specified columns in the order of line 0:

Android: columnsecolumns when this property is empty, the effect is as follows:

"Android: columnsecolumns = 0,2 ------------------" means to remove columns 0 and 2, as shown in the following figure:

Android: shrinkcolumns: automatically extend the specified column to fill the available part in the order of line 0:

When the controls in layoutrow are not full of the layout, shrinkcolumns does not work, as shown in the following figure:

Set shrinkcolumns = 0,1,2, and the layout has not changed at all, because there is enough space left in layoutrow.

When layoutrow fills the control, as shown below:

If shrinkcolumns = 2 is set, the result is as shown in the following figure, and the control automatically fills the space in the vertical direction:

Android: stretchcolumns: fill the blank part of the specified column as far as possible in the order of line 0:

If stretchcolumns = 1 is set, the result is shown in the following figure, and the first column is filled as much as possible (button02 and textview02 are filled to the right at the same time until textview03 is squeezed to the last edge).

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>