<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TableRow
android:layout_weight="1">
<EditText
android:layout_width="match_parent"
android:layout_height="match_parent"
android:hint="To"
android:layout_span="2"
/>
</TableRow>
<TableRow
android:layout_weight="1">
<EditText
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="Subject"
android:layout_span="2"
/>
</TableRow>
<TableRow
android:layout_weight="10">
<EditText
android:layout_width="match_parent"
android:layout_height="match_parent"
android:hint="message"
android:gravity="top"
android:layout_span="2"/>
</TableRow>
<TableRow
android:layout_weight="1">
<Button
android:layout_width="260dp"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:text="确定" /> <Button
android:layout_width="260dp"
android:layout_height="match_parent"
android:text="取消"
android:layout_marginRight="10dp" />
</TableRow> </TableLayout>

TableLayout练习-LMLPHP

05-11 22:03