標籤:
<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)
製作登入介面的布局時候,可以使用 android:stretchColumns="0,3"