以下は私のxmlコードです:
<?xml version="1.0" encoding="utf-8"?>
<GridView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/gridviewgallery"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:columnWidth="@dimen/gridview_column_width"
android:numColumns="auto_fit"
android:verticalSpacing="0dp"
android:horizontalSpacing="0dp"
android:stretchMode="columnWidth"
android:gravity="center"
android:background="#444444"
/>
android:stretchMode="columnWidth" を使用すると、列間にギャップが作成されます (ただし、画面の幅を埋めます)。また、 android:stretchMode="none" を使用すると、左揃えになり、右に左にギャップがあります。画面の側面(ただし、列間にギャップはありません)問題は、両方が必要なことです:画面幅を埋めるだけでなく、列間にギャップもありません。それを達成する方法は?