TableLayout

来源:互联网 发布:js点击li添加样式 编辑:程序博客网 时间:2024/05/16 01:59

TableLayout
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>
0 0
原创粉丝点击