0
我想做一個網格視圖,它有很多圖像。所以我想讓它水平滾動,但它不滾動。如何製作水平滾動的網格視圖?請幫幫我。 這是我的代碼。如何製作水平滾動的網格視圖?
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<HorizontalScrollView
android:id="@+id/horizontalScrollView1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:fillViewport="true"
android:scrollbars="horizontal" >
<GridView
android:layout_width="500dp"
android:layout_height="400dp"
android:id="@+id/gridview"
android:columnWidth="300dp"
android:numColumns="3"
android:horizontalSpacing="10dp"
android:scrollbars="horizontal">
</GridView>
</HorizontalScrollView>
</RelativeLayout>
檢查這個http://stackoverflow.com/questions/13236123/how-to-make-grid-view-horizontally-scrollable-in-android?rq=1 –
我檢查它,跟它添加一些插件,我不想使用任何插件。 –
其不插入..在庫..如果你不想使用任何第三方庫,然後編寫自己的自定義gridview .. –