0
代碼:上述Android網格佈局設置組件如何填充指定的行和列?
<GridLayout
xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:rowCount="6"
android:columnCount="4" >
<!-- define textbox,Across the four columns -->
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_columnSpan="4"
android:textSize="50sp"
android:layout_marginLeft="4px"
android:layout_marginRight="4px"
android:padding="5px"
android:layout_gravity="right"
android:background="#eee"
android:textColor="#000"
android:text="test"
/>
<!-- define two buttons,Delete and reset -->
<Button
android:id="@+id/bn1"
android:layout_columnSpan="2"
android:layout_rowSpan="1"
android:layout_gravity="fill"
android:text="clear"
/>
<Button
android:id="@+id/bn2"
android:layout_columnSpan="2"
android:layout_rowSpan="1"
android:layout_gravity="fill"
android:text="selete"
/>
是mail.xml代碼。下面的結果:
如何各半設置兩個按鈕並填寫一條線嗎?
在此先感謝!