xiaweizi/AndroidToolsExample

RecycleView中其实是可以的,看代码

yizems opened this issue · 6 comments

<android.support.v7.widget.RecyclerView
                        android:id="@+id/rvDonateUser"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:orientation="horizontal"
                        android:overScrollMode="never"
                        android:scrollbars="none"
                        app:layoutManager="LinearLayoutManager"
                        app:spanCount="2"
                        tools:orientation="horizontal"
                        tools:layoutManager="LinearLayoutManager"
                        tools:listitem="@layout/item_donate_user"
                        tools:spanCount="1" />

效果

image

推荐加到README中,帮助更多的人,只是没有提示,我的AS版本为3.0.0

orientation指定方向
layoutManager 指定布局方式
listitem 指定item布局
spanCount代表列数/行数

layoutManager
spanCount
注意上面两个的命名空间是app哦

好的! 多谢了

客气,因为你,我才知道能够这么用的哦-.-

哈哈,我在 README 里加一下,官方都没有介绍。。

这个itemCount 不管用啊

这个recycleview,必须得在itemCount 3.0上才有用啊,折腾半天