-
Notifications
You must be signed in to change notification settings - Fork 28
Closed
Description
<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" />
效果
推荐加到README中,帮助更多的人,只是没有提示,我的AS版本为3.0.0
orientation指定方向
layoutManager 指定布局方式
listitem 指定item布局
spanCount代表列数/行数
Activity
yizems commentedon Feb 8, 2018
layoutManager
spanCount
注意上面两个的命名空间是app哦
xiaweizi commentedon Feb 9, 2018
好的! 多谢了
yizems commentedon Feb 9, 2018
客气,因为你,我才知道能够这么用的哦-.-
xiaweizi commentedon Feb 9, 2018
哈哈,我在 README 里加一下,官方都没有介绍。。
StoneBang commentedon Feb 24, 2018
这个itemCount 不管用啊
StoneBang commentedon Feb 24, 2018
这个recycleview,必须得在itemCount 3.0上才有用啊,折腾半天