制作登录界面的布局时候,可以使用 android:stretchColumns="0,3"
16lz
2021-01-23
<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)
更多相关文章
- 相对布局 RelativeLayout 常用属性介绍
- android布局属性预览
- 安卓布局
- Android下xml中RelativeLayout布局常见属性
- Anddroid各种布局总结
- RelativeLayout 相对布局属性
- Linearlayout与Relativelayout布局回顾 .
- Android学习笔记---第一天---布局
- android布局居中