您的位置:首页 > 其它

TableLayout

2015-12-19 09:04 274 查看


1.
<TableRow>
<TextView>
中的layout_width和layout_height都是由tablelayout控制

2.
<TextView android:layout_column="1">
layout_column
设置为第一列

3.
<TextView android:layout_span="2">
layout_span
设置跨2列

4. stretchColumns设置拉伸第几列

<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:stretchColumns="1">

<TableRow >

<TextView
android:layout_column="1"
android:text="XX"
android:textSize="32sp"
/>
<TextView
android:gravity="right"
android:text="CTRL+O"
android:textSize="32sp"
/>
</TableRow>

<TableRow >
<TextView
android:text=" "
android:textSize="32sp"
/>
<TextView

android:text="XX"
android:textSize="32sp"
/>
<TextView
android:text="SHIFT+CTRL+O"
android:textSize="32sp"
/>

</TableRow>
<TableRow >
<TextView
android:text="T"
android:textSize="32sp"
/>
<TextView
android:layout_span="2"
android:text="XX"
android:textSize="32sp"
/>

</TableRow>
</TableLayout>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: