以下是我的XML代碼:其中stretchMode在GridView中使用Android上
<?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 =「無」,它就會被左對齊並沒有留在屏幕右側的間隙(雖然現在有柱之間沒有間隙),我想 問題是兩個:爲了填補屏幕寬度以及列之間沒有差距。 如何實現它?
增加列數。 –