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 .. –