Table.Layout学习
Table.Layout属于一种表格布局:
Table.Layout属于一种表格布局:
android:stretchColumns="1" //自动填补空白
android:shrinkColumns="2" //当一个button的内容超出一行的长度自动换行
android:layout_column="2" //指定控件的列号
android:layout_span="2" //合并两列
一个例子:TableLayout类似与LinearLayout 的控件配置
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
>
<TableRow >
<Button
android:text="Button11"
/>
<Button
android:text="Button12"
/>
<Button
android:text="Button13"
/>
</TableRow>
<TableRow >
<Button
android:text="Button21"
/>
<Button
android:layout_span="2"
android:text="Button23"
/>
</TableRow>
</TableLayout>