Detailed explanation of table layout of Android layout

This example shares the specific code of Android table layout for your reference. The specific contents are as follows

1.TableLayout

Tablelayout the table layout model manages child controls in the form of rows and columns. Each row is an object of tablerow, and of course, it can also make an object of view

2. Tablelayout properties (global properties)

Android: columnsecolumns = "1,2" hide the index columns starting from 0. The columns must be separated by commas. 1,2 Android: shrinkcolumns = "1,2" shrink the index columns starting from 0. When the shrinkable columns are too wide (too much content), they will not be squeezed out of the screen. The columns are separated by commas. You can shrink all columns by "*", Note that a column can represent contraction and stretching at the same time. Android: stretchcolumns = "1,2" stretch the index column starting from 0 to fill the remaining excess space. The columns must be separated by commas. 1,2, you can shrink all columns by "*". Note that a column can represent contraction and stretching at the same time

3. Local properties of tablelayout (properties used by internal controls)

android:layout_ Column = "1" the control is displayed in the first column Android: layout_ Span = "2" the control occupies two columns

The above is the whole content of this article. I hope it will be helpful to your study, and I hope you can support programming tips.

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
分享
二维码
< <上一篇
下一篇>>