可分组的 RecyclerView 适配器 ExpandableAdapter
- 授权协议: 未知
- 开发语言: Java
- 操作系统: 跨平台
- 软件首页: https://github.com/qbaowei/ExpandableAdapter
- 软件文档: https://github.com/qbaowei/ExpandableAdapter/blob/master/README.md
- 官方下载: https://github.com/qbaowei/ExpandableAdapter/archive/master.zip
软件介绍
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'
