如何水平滚动网格视图而不是垂直滚动

时间:2013-04-05 12:34:22

标签: android

我正在执行一项任务,从服务器检索图像并在应用程序的GridView中显示。此网格视图向上和向下滚动。但我想在菜单屏幕滚动时从左到右滚动此视图。是否可以使用网格视图?或者有更好的方法吗?请帮我做这个

1 个答案:

答案 0 :(得分:0)

在gridview中添加此行。

android:scrollbars="horizontal"

代表:

        <GridView
            android:id="@+id/gridView1"
            android:layout_width="match_parent"
            android:layout_height="match_parent"                
            android:animationCache="true"                
            android:numColumns="3"
            android:scrollbars="horizontal"
            android:scrollingCache="false" >
        </GridView>
相关问题