<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/LinearLayout1" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <TableLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:stretchColumns="0,1,2" android:background="#000000" android:layout_margin="2dp" > <TableRow> <TextView android:layout_width="match_parent" android:layout_height="match_parent" android:layout_margin="0.5dp" android:background="#ffffffff" android:text="姓名" /> <TextView android:layout_width="match_parent" android:layout_height="match_parent" android:layout_margin="0.5dp" android:background="#ffffffff" android:text="联系方式" /> <TextView android:layout_width="match_parent" android:layout_height="match_parent" android:layout_margin="0.5dp" android:background="#ffffffff" android:text="工作" /> </TableRow> <TableRow> <TextView android:layout_width="match_parent" android:layout_height="match_parent" android:layout_margin="0.5dp" android:background="#ffffffff" android:text="张三" /> <TextView android:layout_width="match_parent" android:layout_height="match_parent" android:layout_margin="0.5dp" android:background="#ffffffff" android:text="12345678909" /> <TextView android:layout_width="match_parent" android:layout_height="match_parent" android:layout_margin="0.5dp" android:background="#ffffffff" android:text="程序员" /> </TableRow> <TableRow> <TextView android:layout_width="match_parent" android:layout_height="match_parent" android:layout_margin="0.5dp" android:background="#ffffffff" android:text="岑金" /> <TextView android:layout_width="match_parent" android:layout_height="match_parent" android:layout_margin="0.5dp" android:background="#ffffffff" android:text="13245647867" /> <TextView android:layout_width="match_parent" android:layout_height="match_parent" android:layout_margin="0.5dp" android:background="#ffffffff" android:text="画家" /> </TableRow> <TableRow> <TextView android:layout_width="match_parent" android:layout_height="match_parent" android:layout_margin="0.5dp" android:background="#ffffffff" android:text="薛琳" /> <TextView android:layout_width="match_parent" android:layout_height="match_parent" android:layout_margin="0.5dp" android:background="#ffffffff" android:text="13889655896" /> <TextView android:layout_width="match_parent" android:layout_height="match_parent" android:layout_margin="0.5dp" android:background="#ffffffff" android:text="作家" /> </TableRow> </TableLayout> </LinearLayout>
安卓-表格布局 及 边框
最新推荐文章于 2024-05-09 17:07:14 发布