0
我是android的新的,當我嘗試運行我的代碼,我只是讓我的智能手機和仿真器之間輸精管結果GridView控件行爲不同的手機和模擬器
在我的手機的Android版本是棒棒糖5 的Android版本模擬器是棒棒糖4
這張照片從手機
這張照片從模擬器
,這是我的代碼
<GridLayout
android:layout_width="match_parent"
android:layout_height="300dp"
android:columnCount="2"
android:rowCount="2"
>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_column="0"
android:layout_row="0"
android:layout_columnWeight="1"
android:layout_rowWeight="1"
android:layout_gravity="fill"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_column="1"
android:layout_row="0"
android:layout_columnWeight="1"
android:layout_rowWeight="1"
android:layout_gravity="fill"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_column="0"
android:layout_row="1"
android:layout_columnWeight="0"
android:layout_rowWeight="1"
android:layout_columnSpan="2"
android:layout_gravity="fill"
/>
</GridLayout>