2012-03-01 65 views
1

我刚刚注意到Android Design,也有一个horizontally scrolling grid list。我使用普通的gridview测试它,但它只有垂直滚动。Horizo​​ntall滚动gridview

有人知道这是哪个部件吗?

+0

复制我的G +在这里评论:目前还不能一个框架部件,提供这一点,但类似的东西可以用的renderScript和轮播画面示例代码 – 2012-03-01 01:42:50

+1

感谢罗马来实现。刚提交了一项功能请求。 http://code.google.com/p/android/issues/detail?id=26238 如果您希望此小工具可用,请为此问题加分。 – OKA 2012-03-01 02:07:38

回答

0

您可以在GridView中有一个linearLayout,它代表gridView的每个单元格,然后为linearLayout设置一个minWidth。这将处理这样一个事实,那个gridView的每个单元格必须具有5dp的最小宽度。

0

试试这个:

<GridLayout xmlns:android="http://schemas.android.com/apk/res/android" 
       android:layout_width="wrap_content" 
       android:layout_height="match_parent" 
       android:orientation="vertical" 
       android:rowCount="2"> 

</GridLayout> 
相关问题