2011-05-31 35 views
1

我正在用Gridview顯示一些縮略圖。我遇到的奇怪問題是,如果在清單中未指定android:minSdkVersion,則縮略圖的間距會適當,但如果指定了minSdkVersion(需要爲4或更多),則縮略圖會水平合併。僅當指定minSdkVersion時出現Gridview問題

這個問題只出現在我的測試手機上,一個T Mobile脈衝迷你,我在模擬器上沒有這樣的問題。

感謝您對此有任何好的想法。

XML如下所示。

<?xml version="1.0" encoding="utf-8"?> 

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:orientation="vertical" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    > 

    <!--thumbnails--> 
    <GridView 
     android:id="@+id/gridview" 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
     android:columnWidth="90dp" 
     android:numColumns="auto_fit" 
     android:verticalSpacing="10dp" 
     android:horizontalSpacing="10dp" 
     android:stretchMode="none" 
     android:gravity="center" 
    /> 

</LinearLayout> 

回答

相關問題