{"id":13713346,"url":"https://github.com/CarGuo/LazyRecyclerAdapter","last_synced_at":"2025-05-06T23:31:57.217Z","repository":{"id":107563563,"uuid":"74585853","full_name":"CarGuo/LazyRecyclerAdapter","owner":"CarGuo","description":"极简通用的RecyclerAdapter，入侵性低，支持一个列表多种Item类型，无需维护和编写Adapter代码，快速集成拥有点击，动画，自定义刷新，自定义加载更多，自定义空页面显示，通用分割线，动态绑定等高复用，你只需要编写维护Holder代码。","archived":false,"fork":false,"pushed_at":"2019-12-31T07:38:42.000Z","size":14958,"stargazers_count":267,"open_issues_count":1,"forks_count":63,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-10T01:13:51.610Z","etag":null,"topics":["baserecyclerviewadapterhelper","kotlin","multitype","recyclerview","xrecycler"],"latest_commit_sha":null,"homepage":"https://github.com/CarGuo/LazyRecyclerAdapter","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CarGuo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-23T14:47:13.000Z","updated_at":"2025-02-01T06:18:10.000Z","dependencies_parsed_at":"2023-06-08T12:15:26.186Z","dependency_job_id":null,"html_url":"https://github.com/CarGuo/LazyRecyclerAdapter","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarGuo%2FLazyRecyclerAdapter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarGuo%2FLazyRecyclerAdapter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarGuo%2FLazyRecyclerAdapter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarGuo%2FLazyRecyclerAdapter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CarGuo","download_url":"https://codeload.github.com/CarGuo/LazyRecyclerAdapter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252787531,"owners_count":21804278,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["baserecyclerviewadapterhelper","kotlin","multitype","recyclerview","xrecycler"],"created_at":"2024-08-02T23:01:33.403Z","updated_at":"2025-05-06T23:31:52.206Z","avatar_url":"https://github.com/CarGuo.png","language":"Java","funding_links":[],"categories":["Mobile Development"],"sub_categories":["C++/C Toolkit"],"readme":"\n![](https://github.com/CarGuo/LazyRecyclerAdapter/blob/master/33.png)\n\n### 这个一个极简的通用RecyclerView的Adapter，入侵性低，一个Adapter解决日常开发中常用的各种功能，你无需再写任何Adapter代码，让你普通的RecyclerView变得灵活、解耦、通用、丰富起来吧。\n\n[![](https://jitpack.io/v/CarGuo/LazyRecyclerAdapter.svg)](https://jitpack.io/#CarGuo/LazyRecyclerAdapter)\n[![Build Status](https://travis-ci.org/CarGuo/LazyRecyclerAdapter.svg?branch=master)](https://travis-ci.org/CarGuo/LazyRecyclerAdapter)\n\n## 一、功能\n\n状态 | 功能\n-------- | ---\n**支持**|**系统RecyclerView和任意数据实体**\n**支持**|**动态加载各种Item类型的列表、瀑布流、网格**\n**支持**|**列表、瀑布流、网格的刷新和加载更多效果，支持上下左右各个方向**\n**支持**|**自定义刷新和加载效果**\n**支持**|**内置支持各种列表和方向的万能分割线**\n**支持**|**点击和长按效果**\n**支持**|**空页面**\n**支持**|**Item的动画效果**\n**支持**|**Header头支持**\n**支持**|**一种数据实体对应多种Item**\n**支持**|**侧滑、拖拽**\n**支持**|**快速实现聊天模式(DEMO包含Dagger2、MVP、RxJava2、Realm、键盘弹出优化处理)**\n**支持**|**Kotlin与Kotlin Demo（Dagger2、MVP、RxJava2、(Realm、Room)）**\n待支持|内置更多自定义Manager\n\n## 二、依赖\n\n### 在你的项目project下的build.gradle添加\n```\nallprojects {\n\trepositories {\n\t\t...\n\t\tmaven { url 'https://jitpack.io' }\n\t}\n}\n```\n### 在module下的build.gradle添加依赖\n```\ndependencies {\n    compile 'com.github.CarGuo.LazyRecyclerAdapter:CommonRecycler:v4.0.0'\n}\n\n```\n\n### (Kotlin)在module下的build.gradle添加依赖\n```\ndependencies {\n    compile 'com.github.CarGuo.LazyRecyclerAdapter:CommonRecycler-Kotlin:v4.0.0'\n}\n\n```\n\n![公众号](http://img.cdn.guoshuyu.cn/WeChat-Code)\n\n## 三、效果\n#### 更多效果请看DEMO\n#### 聊天DEMO中包含Dagger2、MVP、RxJava2、Realm、Factory模式、键盘弹出优化处理。\n\u003cdiv\u003e\n\u003cimg src=\"https://github.com/CarGuo/CommonRecycler/blob/master/12.png\" width=\"240px\" height=\"436px\"/\u003e\n\u003cimg src=\"https://github.com/CarGuo/CommonRecycler/blob/master/13.png\" width=\"240px\" height=\"436px\"/\u003e\n\u003cimg src=\"https://github.com/CarGuo/CommonRecycler/blob/master/14.png\" width=\"240px\" height=\"436px\"/\u003e\n\u003cimg src=\"https://github.com/CarGuo/CommonRecycler/blob/master/15.png\" width=\"240px\" height=\"436px\"/\u003e\n\u003c/div\u003e\n\n## 四、使用方法\n\n#### 1、创建管理器\n\n管理器绑定数据、布局、Holder。其中XXXHolder需要继承BindRecyclerBaseHolder。\n\n（BindRecyclerBaseHolder是一个继承了RecyclerView.ViewHolder的基类。）\n\n```\n//创建管理器\nBindSuperAdapterManager normalAdapterManager = new BindSuperAdapterManager();\n//将数据Model类、布局layoutId、RecyclerView.ViewHolder绑定\nnormalAdapterManager\n        .bind(BindImageModel.class, R.layout.horizontal_image_item, BindImageHolder.class)\n        .bind(BindTextModel.class, R.layout.horizontal_text_item, BindTextHolder.class)\n        .bind(BindClickModel.class, R.layout.horizontal_click_item, BindClickHolder.class)\n        .bindEmpty(BindNoDataHolder.NoDataModel.class, BindNoDataHolder.ID, BindNoDataHolder.class)\n```\n\n#### 2、创建Adapter，设置RecyclerView\n\n```\n//通过管理器构建Adapter\nBindSuperAdapter adapter = new BindSuperAdapter(context, normalAdapterManager, datas);\n\nrecycler.setLayoutManager(staggeredGridLayoutManager);\nrecycler.setAdapter(adapter);\n\n```\n\n#### 更多高级用法请看Demo与[wiki 文档](https://github.com/CarGuo/LazyRecyclerAdapter/wiki)。\n\n## License\n\n本项目把XRecyclerView的部分功能拆解到Adapter。\n\n```\n\nMIT\n\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCarGuo%2FLazyRecyclerAdapter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCarGuo%2FLazyRecyclerAdapter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCarGuo%2FLazyRecyclerAdapter/lists"}