制作登录界面的布局时候,可以使用 android:stretchColumns="0,3"
16lz
2021-12-04
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:stretchColumns="0,3"
>
<TableRow
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
<TextView/>
<TextView
android:textSize="24px"
android:text="@string/hello_world"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<EditText
android:layout_width="wrap_content"
android:minWidth="145dp"
android:layout_height="wrap_content"/>
<TextView/>
</TableRow>
<TableRow
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
<TextView/>
<TextView
android:textSize="24px"
android:text="@string/hello_world"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<EditText
android:layout_width="wrap_content"
android:minWidth="145dp"
android:layout_height="wrap_content"/>
<TextView/>
</TableRow>
<TableRow
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
<TextView/>
<TextView
android:textSize="24px"
android:text="@string/hello_world"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<EditText
android:layout_width="wrap_content"
android:minWidth="145dp"
android:layout_height="wrap_content"/>
<TextView/>
</TableRow>
</TableLayout>
android:stretchColumns="0,3"
拉伸第一个和第4个 这个属性在tablelayout布局里使用
制作登录界面的布局时候,可以使用
来自为知笔记(Wiz)
更多相关文章
- selector
- android listview 的一些属性
- 相对布局 RelativeLayout 常用属性介绍
- Android(安卓)RelativeLayout用到的一些重要的属性
- android布局属性预览
- Android(安卓)xml ListView 的divider属性
- 刚刚接触Android,写第一个Hello world 小项目笔记
- android:layout_gravity和android:gravity属性的区别
- 『ANDROID』android:layout_gravity和android:gravity属性的区别