吸顶列表 | 收起展开 |
---|---|
![]() |
![]() |
名字 | 摘要 |
---|---|
BaseRecyclerViewAdapter | 基础Adapter |
StickyHeaderLayout | 头部吸顶控件 |
StickyHeaderLayout需结合BaseRecyclerViewAdapter使用,直接包裹RecyclerView即可
<ysn.com.baserecyclerviewadapter.view.StickyHeaderLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/sticky_list_activity_recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</ysn.com.baserecyclerviewadapter.view.StickyHeaderLayout>
直接继承BaseRecyclerViewAdapter
在项目的 build.gradle
文件中配置仓库地址。
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
在需要添加依赖的 Module 下添加以下信息,使用方式和普通的远程仓库一样。
implementation 'com.github.yangsanning:BaseRecyclerViewAdapter:1.0.0'