标签:
<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"
标签:
原文地址:http://www.cnblogs.com/liupengcheng/p/4571693.html