<?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"
android:stretchColumns="0">
<TableRow>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="第一个"></Button>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="第二个"></Button>
</TableRow>
<TableRow>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="第一个"></Button>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="第二个"></Button>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="第二个"></Button>
</TableRow>
</TableLayout>
<!-- TableRow-->
<!--设置为一行,超过不显示-->
安卓开发TableLayout 布局
最新推荐文章于 2024-05-14 09:32:17 发布