{"id":19993261,"url":"https://github.com/TommyLemon/Android-ZBLibrary","last_synced_at":"2025-05-04T12:31:06.493Z","repository":{"id":36798636,"uuid":"41105450","full_name":"TommyLemon/Android-ZBLibrary","owner":"TommyLemon","description":"🔥 Android MVP 快速开发框架，做国内 「示例最全面」「注释最详细」「使用最简单」「代码最严谨」的 Android 开源 UI 框架。                🔥 An Android MVP Framework with many demos, detailed documents, simple usages and strict codes.","archived":false,"fork":false,"pushed_at":"2024-11-30T14:16:39.000Z","size":32789,"stargazers_count":5577,"open_issues_count":12,"forks_count":1380,"subscribers_count":235,"default_branch":"master","last_synced_at":"2025-04-23T22:57:27.235Z","etag":null,"topics":["fastjson","glide","okhttp","recyclerview","smartrefreshlayout","swipeback","zxing"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TommyLemon.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":"2015-08-20T16:03:53.000Z","updated_at":"2025-04-22T09:12:59.000Z","dependencies_parsed_at":"2022-07-10T15:00:27.309Z","dependency_job_id":"7474b624-511b-4598-ba99-fd28cbbd08d7","html_url":"https://github.com/TommyLemon/Android-ZBLibrary","commit_stats":null,"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TommyLemon%2FAndroid-ZBLibrary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TommyLemon%2FAndroid-ZBLibrary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TommyLemon%2FAndroid-ZBLibrary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TommyLemon%2FAndroid-ZBLibrary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TommyLemon","download_url":"https://codeload.github.com/TommyLemon/Android-ZBLibrary/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252334274,"owners_count":21731370,"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":["fastjson","glide","okhttp","recyclerview","smartrefreshlayout","swipeback","zxing"],"created_at":"2024-11-13T04:52:33.278Z","updated_at":"2025-05-04T12:31:01.485Z","avatar_url":"https://github.com/TommyLemon.png","language":"Java","readme":"# ZBLibrary-Android快速开发框架 \n\n[![](https://jitpack.io/v/TommyLemon/Android-ZBLibrary.svg)](https://jitpack.io/#TommyLemon/Android-ZBLibrary)\n[![Android](https://img.shields.io/badge/Android-4.0.3%2B-brightgreen.svg?style=flat)](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n[![Gradle Version](https://img.shields.io/badge/gradle-2.10%2B-green.svg)](https://docs.gradle.org/current/release-notes)\n[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)\n\n\nMVP 架构，提供一套开发标准（View, Data, Event）以及模板和工具类并规范代码。封装层级少，简单高效兼容性好。\n\nOKHttp 网络请求、Glide 图片加载、ZXing 二维码、沉浸状态栏、下载安装、自动缓存以及各种 Base、Demo、UI、Util 直接用。\n\n全新的手势，侧滑返回、全局右滑返回都 OUT 啦！\n\n用 [BaseView](https://github.com/TommyLemon/Android-ZBLibrary/blob/master/ZBLibrary/src/main/java/zuo/biao/library/base/BaseView.java)，自定义 View 竟然如此简单;\n\n用 [Entry\u003cK, V\u003e](https://github.com/TommyLemon/Android-ZBLibrary/blob/master/ZBLibrary/src/main/java/zuo/biao/library/model/Entry.java)，两个变量的 Model/JavaBean 再也不用写了;\n\n用 [BaseHttpListActivity](https://github.com/TommyLemon/Android-ZBLibrary/blob/master/ZBLibrary/src/main/java/zuo/biao/library/base/BaseHttpListActivity.java)，几行代码搞定 HTTP 请求列表 加载和缓存;\n\n还有 100 多个常用 [Style](https://github.com/TommyLemon/Android-ZBLibrary/blob/master/ZBLibrary/src/main/res/values/styles.xml)，一行搞定 View 属性，一键统一配置UI... \n\n点击右边链接查看如何使用 [http://my.oschina.net/u/2437072/blog/665241](http://my.oschina.net/u/2437072/blog/665241)\n\n\n![](https://raw.githubusercontent.com/TommyLemon/StaticResources/master/ZBLibrary_AllPages.jpg)\n\n[以下 Gif 图看起来比较卡，实际在手机上 App 运行很流畅]\n\nZBLibraryDemoApp\u003cbr /\u003e\n\n![](https://raw.githubusercontent.com/TommyLemon/StaticResources/master/ZBLibrary_Cache.gif)\n![](https://raw.githubusercontent.com/TommyLemon/StaticResources/master/ZBLibrary_PlacePicker.gif)\n![](https://raw.githubusercontent.com/TommyLemon/StaticResources/master/ZBLibrary_DatePicker.gif)\n\n\u003cbr /\u003e\nAPIJSONApp\u003cbr /\u003e\n\n![](https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_App_MomentList_Circle.gif) \n![](https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_App_Moment_Name.gif) \n![](https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_App_Moment_Comment.gif)\n\n\n### 下载试用\n\n[ZBLibraryDemoApp.apk(ZBLibrary)](http://files.cnblogs.com/files/tommylemon/ZBLibraryDemoApp.apk)\n\n[APIJSONApp.apk(APIJSON+ZBLibrary)](http://files.cnblogs.com/files/tommylemon/APIJSONApp.apk)\n\n### 感谢开源\n[Glide](https://github.com/bumptech/glide)\nGoogle 官方推荐的一个强大易用的图片加载库。\n\n[OKHttp](https://github.com/square/okhttp)\n很火很强大的 HTTP/HTTPS 传输框架。ZBLibrary 中的 HttpManager 对它做了封装（支持自签名Https），Demo 中的 HttpRequest 是使用示例。\n注：okio.jar 是 OKHttp 的一部分，不能删除。删除后不会在代码中报错，但运行会出错。\n\n[FastJson](https://github.com/alibaba/fastjson)\n阿里巴巴的 JSON 封装和解析库。ZBLibrary 中的 JSON 是对 fastjson 的简单封装，防止解析异常。\n\n[SmartRefreshLayout](https://github.com/scwang90/SmartRefreshLayout)\n下拉刷新、上拉加载的组件库，已在 [BaseHttpRecyclerActivity](https://github.com/TommyLemon/Android-ZBLibrary/blob/master/ZBLibrary/src/main/java/zuo/biao/library/base/BaseHttpRecyclerActivity.java) 等类内置支持。\n\n[SystemBarTint](https://github.com/jgilfelt/SystemBarTint)\n系统栏管理器，我把它用在 ZBLibrary 的 BaseActivity 中实现了状态栏沉浸。\n\n[ZXingLib](https://github.com/xuyisheng/ZXingLib)\n这是该作者对官方 ZXing 二维码库的精简版。我做了修改，作为 ZBLibrary 的 QRCodeLibrary。\n\n\n### 初始化\n\n假设你工程中的 Application 为 zblibrary.demo.application.DemoApplication，并且已在 AndroidManifest.xml 中注册\n```\n    \u003capplication\n        android:name=\"zblibrary.demo.application.DemoApplication\"\n        ...\n        \u003e\n    \u003c/application\u003e\n```\n\n可以用 DemoApplication 继承 BaseApplication\n```\npublic class DemoApplication extends BaseApplication {\n...\n}\n```\n或 在 DemoApplication 的 onCreate 函数 中调用 BaseApplication.init(this);\n```\npublic class DemoApplication extends Application {\n\n\t@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\t\n\t\tBaseApplication.init(this);\n\t}\n  ...\n}\n```\n\n注册 权限和 Activity 等代码可复制 ZBLibrary 中 AndroidManifest.xml 里的 \\\u003cuses-permission/\u003e, \\\u003cactivity/\u003e 等相关代码。\n\n### 生成代码\n可使用 APIAuto 自动化接口管理工具来生成接口相关代码：\n* 自动生成封装请求 JSON 的代码\n* 自动生成解析结果 JSON 的代码\n* 自动生成 Modle/JavaBean\n\n[https://github.com/TommyLemon/APIAuto](https://github.com/TommyLemon/APIAuto)\n\n### 编程思想\n* 能复制就复制，节约时间避免出错\n* 保留原本结构，简单上手容易调试\n* 增加必要注释，说明功能和使用方法\n* 说明随手可得，不用上网或打开文档\n* 命名必须规范，容易查找一看就懂\n* 重载尽量转发，减少代码容易修改\n* 最先校验参数，任意调用不会崩溃\n* 代码模块分区，方便浏览容易查找\n* 封装常用代码，方便使用降低耦合\n* 回收多余占用，优化内存提高性能\n* 分包结构合理，模块清晰浏览方便\n* 多用工具和快捷键，增删改查快捷高效\n\n### 相关推荐\n[Android快速开发框架-ZBLibrary介绍](http://my.oschina.net/u/2437072/blog/662017)\n\n[如何使用ZBLibrary-Android快速开发框架](http://my.oschina.net/u/2437072/blog/665241)\n\n[仿QQ空间和微信朋友圈，高解耦高复用高灵活](https://my.oschina.net/tommylemon/blog/885787)\n\n[全新的手势，侧滑返回、全局右滑返回都OUT啦！](http://www.cnblogs.com/tommylemon/p/5576337.html)\n\n[不一样的Android选择器，简单方便，地址日期时间都好用！](https://my.oschina.net/u/2437072/blog/756271)\n\n[自定义ZXing二维码扫描界面并解决取景框拉伸等问题](http://my.oschina.net/u/2437072/blog/687986)\n\n[零门槛！ZBLibrary仿微信朋友圈自定义View，就是这么简单！](http://my.oschina.net/u/2437072/blog/666625)\n\n[BaseHttpListActivity，几行代码搞定Http列表请求、加载和缓存](http://my.oschina.net/u/2437072/blog/726229)\n\n[ListView滑动不爽,滚动一页得滑几次？该用分页列表啦！](http://my.oschina.net/u/2437072/blog/700674)\n\n[高灵活低耦合Adapter快速开发攻略](http://my.oschina.net/u/2437072/blog/701165)\n\n[万能的Entry，两个变量的Model/JavaBean再也不用写了！](http://my.oschina.net/u/2437072/blog/671895)\n\n[Android HTTPS如何10分钟实现自签名SSL证书](http://my.oschina.net/u/2437072/blog/669041)\n\n[100多个Styles快速开发布局XML，一行搞定View属性，一键统一配置UI...](http://my.oschina.net/u/2437072/blog/716573)\n\n\n### 开发规范\n[Wiki-Norm](https://github.com/TommyLemon/Android-ZBLibrary/wiki/%E5%BC%80%E5%8F%91%E8%A7%84%E8%8C%83)\n\n### 架构、模式、技术\n[Wiki-Architecture,Pattern,Technology](https://github.com/TommyLemon/Android-ZBLibrary/wiki/%E6%9E%B6%E6%9E%84%E3%80%81%E6%A8%A1%E5%BC%8F%E3%80%81%E6%8A%80%E6%9C%AF)\n\n### 问题及解决方法\n[Wiki-FAQ](https://github.com/TommyLemon/Android-ZBLibrary/wiki/%E9%97%AE%E9%A2%98%E5%8F%8A%E8%A7%A3%E5%86%B3%E6%96%B9%E6%B3%95)\n\n### 使用登记\n\u003cdiv style=\"float:left\"\u003e\n  \u003ca href=\"https://www.leapmotor.com/\"\u003e\u003cimg src=\"https://pp.myapp.com/ma_icon/0/icon_52688286_1551098818/96\" height=\"60\"\u003e\u003c/a\u003e\n  \u003ca href=\"http://www.egatee.com\"\u003e\u003cimg src=\"https://github.com/TommyLemon/StaticResources/blob/master/Egatee.webp\" height=\"60\"\u003e\u003c/a\u003e\n  \u003ca href=\"http://www.hzviewin.com/cxb\"\u003e\u003cimg src=\"https://android-artworks.25pp.com/fs08/2018/11/07/5/106_d33fcebea05e7bc1510a606d4bff86c7_con_130x130.png\" height=\"60\"\u003e\u003c/a\u003e\n  \u003ca href=\"http://www.dzwww.com/shandong/sdnews/201803/t20180305_17109009.htm\"\u003e\u003cimg src=\"https://android-artworks.25pp.com/fs08/2018/03/12/1/110_d483f8186cd7ffb2f1bf1992f250e722_con_130x130.png\" height=\"60\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://sj.qq.com/myapp/detail.htm?apkName=com.pianfu.hungrybat\"\u003e\u003cimg src=\"https://pp.myapp.com/ma_icon/0/icon_42293553_1479800504/96\" height=\"60\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.wandoujia.com/apps/com.pobing.crafts\"\u003e\u003cimg src=\"https://android-artworks.25pp.com/fs08/2016/06/07/10/1_dc9bffc8d352e7eb329a0851cf5bb097_con_130x130.png\" height=\"60\"\u003e\u003c/a\u003e\n  \u003ca href=\"http://zhushou.360.cn/detail/index/soft_id/3276581?recrefer=SE_D_%E5%BF%AB%E7%94%A8%E9%80%9A%E8%AE%AF%E5%BD%95\"\u003e\u003cimg src=\"http://p17.qhimg.com/t01ed3c14480b8bef6b.png\" height=\"60\"\u003e\u003c/a\u003e\n  \u003ca href=\"http://zhushou.360.cn/detail/index/soft_id/2687307?recrefer=SE_D_hi%E5%88%9D%E8%A7%81\"\u003e\u003cimg src=\"http://p16.qhimg.com/t01dccaedd0ebed2ad9.png\" height=\"60\"\u003e\u003c/a\u003e\n  \u003ca href=\"http://www.bjzxyy.com\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/TommyLemon/StaticResources/master/BaoJiShiZhongXinYiYuan.png\" height=\"60\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/TommyLemon/APIJSON\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png\" height=\"60\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\u003cbr /\u003e\n\n* 深圳市传音通讯有限公司\n* 浙江零跑科技股份有限公司\n* 杭州妙影微电子有限公司\n* 山东瑞翔科技有限公司\n* 杭州市珀冰科技有限公司\n* 魔笛手(杭州)网络科技有限公司\n* 佛山市手艺人有限公司\n* 山东国大智能科技有限公司\n* 宝鸡中心医院\n\n[您在使用 ZBLibrary 吗？](https://github.com/TommyLemon/Android-ZBLibrary/issues/18)\n\n\n### 关于作者\n[https://github.com/TommyLemon](https://github.com/TommyLemon)\u003cbr /\u003e\n\u003cimg width=\"1280\" src=\"https://github.com/TommyLemon/UIGO/assets/5738175/ec77df98-ff9b-43aa-b2f1-2fce2549d276\"\u003e\n\n\u003cdiv style=\"float:left\"\u003e\n  \u003ca href=\"https://github.com/TommyLemon\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/5738175?s=400\u0026u=5b2f372f0c03fae8f249d2d754e38971c2e17b92\u0026v=4\" height=\"90\" width=\"90\" \u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/TommyLemon/Android-ZBLibrary/pull/37\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/34591987?s=400\u0026v=4\" height=\"90\" width=\"90\" \u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/TommyLemon/Android-ZBLibrary/pull/26\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/8438560?s=460\u0026v=4\"  height=\"90\" width=\"90\" \u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/TommyLemon/Android-ZBLibrary/pull/31\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/45145447?s=400\u0026v=4\"  height=\"90\" width=\"90\" \u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/TommyLemon/Android-ZBLibrary/pull/2\"\u003e\u003cimg src=\"https://avatars0.githubusercontent.com/u/9335665?s=460\u0026v=4\"  height=\"90\" width=\"90\" \u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/TommyLemon/Android-ZBLibrary/pull/33\"\u003e\u003cimg src=\"https://avatars2.githubusercontent.com/u/30994405?s=400\u0026v=4\"  height=\"90\" width=\"90\" \u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/TommyLemon/Android-ZBLibrary/pull/39\"\u003e\u003cimg src=\"https://avatars0.githubusercontent.com/u/1075578?s=400\u0026v=4\"  height=\"90\" width=\"90\" \u003e\u003c/a\u003e\n\u003c/div\u003e\n\u003cbr /\u003e\n感谢其它作者的贡献。\n\n#### QQ技术交流群\n1050166440（新）\u003ca target=\"_blank\" style=\"bottom:2px;padding-top:4px\" href=\"https://qm.qq.com/cgi-bin/qm/qr?k=GTjiuzvEO0yaajNv-vy3bNnGDJPygv0i\u0026jump_from=webapi\"\u003e\u003cimg border=\"0\" src=\"http://pub.idqqimg.com/wpa/images/group.png\" alt=\"ZBLibrary3\" title=\"ZBLibrary技术交流群3\"  style=\"bottom:2px;margin-top:4px\" /\u003e\u003c/a\u003e    \n421793905（满） \u003ca target=\"_blank\" style=\"bottom:2px;padding-top:4px\" href=\"https://qm.qq.com/cgi-bin/qm/qr?k=FnufE63OWowsjOtO970SMiHKW873dka9\u0026jump_from=webapi\"\u003e\u003cimg border=\"0\" src=\"http://pub.idqqimg.com/wpa/images/group.png\" alt=\"ZBLibrary2\" title=\"ZBLibrary技术交流群2\"  style=\"bottom:2px;margin-top:4px\" /\u003e\u003c/a\u003e    \n595514898（满）\u003ca target=\"_blank\" style=\"bottom:2px;padding-top:4px\" href=\"https://qm.qq.com/cgi-bin/qm/qr?k=gfm9X2yO2cUq0jwND3Hgkh12zfjeGdtC\u0026jump_from=webapi\"\u003e\u003cimg border=\"0\" src=\"http://pub.idqqimg.com/wpa/images/group.png\" alt=\"ZBLibrary1\" title=\"ZBLibrary技术交流群1\"  style=\"bottom:2px;margin-top:4px\" /\u003e\u003c/a\u003e    \n\n如果有什么问题或建议可以 [提 ISSUE ](https://github.com/TommyLemon/Android-ZBLibrary/issues) 或 加群，交流技术，分享经验。\u003cbr \u003e\n如果你解决了某些 Bug，或者新增了一些功能，欢迎 [贡献代码](https://github.com/TommyLemon/Android-ZBLibrary/pulls)，感激不尽^_^\n\n\n### 其它项目\n[APIJSON](https://github.com/Tencent/APIJSON) 🚀 腾讯零代码、全功能、强安全 ORM 库 🏆 后端接口和文档零代码，前端(客户端) 定制返回 JSON 的数据和结构\n\n[APIAuto](https://github.com/TommyLemon/APIAuto) 敏捷开发最强大易用的接口工具，机器学习零代码测试、生成代码与静态检查、生成文档与光标悬浮注释\n\n[UnitAuto](https://github.com/TommyLemon/UnitAuto) 机器学习零代码单元测试平台，零代码、全方位、自动化 测试 方法/函数 的正确性、可用性和性能\n\n[SQLAuto](https://github.com/TommyLemon/SQLAuto) 智能零代码自动化测试 SQL 语句执行结果的数据库工具，一键批量生成参数组合、快速构造大量测试数据\n\n[UIGO](https://github.com/TommyLemon/UIGO) 📱 零代码快准稳 UI 智能录制回放平台 🚀 自动兼容任意宽高比分辨率屏幕、自动精准等待网络请求，录制回放快、准、稳！\n\n[APIJSON-Android-RxJava](https://github.com/TommyLemon/APIJSON-Android-RxJava) ZBLibrary(UI) + APIJSON(HTTP) + RxJava(Data)\n\n[AbsGrade](https://github.com/APIJSON/AbsGrade) 列表级联算法，支持微信朋友圈单层评论、QQ空间双层评论、百度网盘多层(无限层)文件夹等\n\n[PagedListView](https://github.com/TommyLemon/PagedListView) 分页滑动列表工具，优化 ListView/GridView 的滑动和滚动体验\n\n\n### 持续更新\n[https://github.com/TommyLemon/Android-ZBLibrary/commits/master](https://github.com/TommyLemon/Android-ZBLibrary/commits/master)\n\n### 我要赞赏\n腾讯、中国移动、中国电信、华为、字节跳动、阿里巴巴、美团、网易、百度、京东、小米、TCL、万达、中兴、携程、360、美图、同花顺、用友、金蝶 等 和国外 Google, Microsoft, Amazon, SAMSUNG, Airbnb, ThoughtWorks, DHC 等各大知名大厂员工点了 Star，感谢大家的支持~ \u003cbr /\u003e\n![image](https://github.com/TommyLemon/Android-ZBLibrary/assets/5738175/cc4d0930-92c9-4b8b-8a30-99fc776923a6)\n\n**创作不易、坚持更难，右上角点亮 ⭐Star 支持/收藏下本项目吧，谢谢 ^_^** \u003cbr /\u003e\n[https://github.com/TommyLemon/Android-ZBLibrary](https://github.com/TommyLemon/Android-ZBLibrary)\n","funding_links":[],"categories":["Java"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTommyLemon%2FAndroid-ZBLibrary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTommyLemon%2FAndroid-ZBLibrary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTommyLemon%2FAndroid-ZBLibrary/lists"}