首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >如何在RecyclerView中的项目之间添加分隔符和空格?

如何在RecyclerView中的项目之间添加分隔符和空格?

提问于 2017-12-19 11:20:21
回答 2关注 0查看 560

"这是一个如何在ListView课堂上使用divider和dividerHeight参数完成的例子:

<ListView

android:id=""@+id/activity_home_list_view""

android:layout_width=""match_parent""

android:layout_height=""match_parent""

android:divider=""@android:color/transparent""

android:dividerHeight=""8dp""/>

但是,我并没有看到这样的可能性RecyclerView。

<android.support.v7.widget.RecyclerView

android:id=""@+id/activity_home_recycler_view""

android:layout_width=""match_parent""

android:layout_height=""match_parent""

android:scrollbars=""vertical""/>

在这种情况下,定义边距和/或直接将自定义分隔视图添加到列表项的布局是否可行,还是有更好的方法来实现我的目标?"

回答

和开发者交流更多问题细节吧,去 写回答
相关文章

相似问题

相关问答用户
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档