andorid_tablelayout

理论推荐链接:http://my.oschina.net/taoyy/blog/53325
例子(XML):
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="3dip"
    >
    <TableLayout
        android:id="@+id/table_one"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        >
        <TableRow
            android:layout_width="120px"
            android:layout_height="40px"
            >
            <Button android:text="按钮一"/>
            <Button android:text="按钮二"/>
        </TableRow>
         <TableRow
             android:layout_width="120px"
             android:layout_height="40px"
             >
            <Button android:text="二按钮一"/>
            <Button android:text="二按钮二"/>
        </TableRow>
    </TableLayout>
    <Button
        android:layout_width="120px"
        android:layout_height="80px"
        android:id="@+id/rebackBtn"
        android:text="返回主窗体"/>
</LinearLayout>

你可能感兴趣的:(andorid,tablelayout)