ExpandableAdapter 介绍
ExpandableAdapter,继承自 RecyclerView.Adapter,支持header,child, group, groupchild,
footer 分组,并且支持group悬浮效果(Sticky效果)。
运行截图:
示例代码:
1.需要Group悬浮,将RecyclerView包裹在’StickyLayout’里面,并且调用’stickylayout’的init函数传入参数true(true,表示group悬浮,false表示不悬浮)
<com.qbw.recyclerview.expandable.StickyLayout android:id="@+id/stickylayout" android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.v7.widget.RecyclerView android:id="@+id/recyclerview" android:layout_width="match_parent" android:layout_height="match_parent" /> </com.qbw.recyclerview.expandable.StickyLayout>
2.不需要Group悬浮,可直接使用’RecyclerView’
<android.support.v7.widget.RecyclerView android:id="@+id/recyclerview" android:layout_width="match_parent" android:layout_height="match_parent" />
下载:
Gradle:
compile 'com.qbw.recyclerview:expandableadapter:2.4.0'
ExpandableAdapter 官网
https://github.com/qbaowei/ExpandableAdapter
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。