<?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>
![](https://img2024.cnblogs.com/blog/35695/202408/35695-20240826070647288-243310440.jpg)