我有这个代码:
<?xml version="1.0" encoding="utf-8"?>
<GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:columnCount="8"
android:rowCount="8" >
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
<ImageButton
android:src="@android:drawable/ic_menu_rotate"
android:contentDescription="@null" />
</GridLayout>
它给了我这个:
它应该是一个 8x8 网格,但它已经溢出了。我如何以非编程方式(通过 xml)适应 64 个正方形?