3
Android入门第7天-TableLayout
source link: https://blog.csdn.net/lifetragedy/article/details/127705148
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
这个布局超级常用,我给各位截几个图你们就知道它用在哪些场景了。
Table布局简单例子
在学习TableLayout时,记得几个要领就行了。它就和我们的最早的在学HTML时那种<table>一样后面变成了<div>。它被大量使用在表单布局器里用来做层次布局用的。
一个TableLayout有几行,就内嵌几层 <TableRow>。
一行里有几列就依赖于一个<TableRow>里有几个控件,它们会自动从左到右依次排开,一个控件就一列。如下面这个例子,它有4个button就有4列:
以下是代码
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK