Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
yizems opened this issue Feb 8, 2018 · 6 comments
Closed

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

yizems opened this issue Feb 8, 2018 · 6 comments

Comments

@yizems
Copy link

yizems commented Feb 8, 2018

<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代表列数/行数

@yizems
Copy link
Author

yizems commented Feb 8, 2018

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

@xiaweizi
Copy link
Owner

xiaweizi commented Feb 9, 2018

好的! 多谢了

@yizems
Copy link
Author

yizems commented Feb 9, 2018

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

@yizems yizems closed this as completed Feb 9, 2018
@xiaweizi
Copy link
Owner

xiaweizi commented Feb 9, 2018

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

@StoneBang
Copy link

这个itemCount 不管用啊

@StoneBang
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants