我如何获得垂直滚动GridView的机器人?

我如何获得垂直滚动GridView的机器人?

问题描述:

我开发一个Android应用程序与显示图像。我使用网​​格视图展现在我的应用程序中的图像。

I am developing an android application with showing images. I am using grid view to show the images in my application.

但是默认的GridView是水平滚动我要显示在垂直滚动网​​格视图图像。

But default gridview is horizontal scrolling I want to show the images in vertical scrolling grid view.

请给我建议的方式来实现在GridView的垂直滚动。

Please suggest me a way to achieve vertical scrolling in gridview.

在此先感谢。

使用机器人:为numColumns =3//这将迫使GridView中有3列,如果你有超过3项网格视图,你可以有垂直滚动。

例:

<GridView xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/gridView1"
    android:numColumns="3"
    android:gravity="center"
    android:columnWidth="50dp"
    android:stretchMode="columnWidth"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" >

</GridView>