GithubHelp home page GithubHelp logo

burnninghotel / android-zblibrary Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tommylemon/android-zblibrary

0.0 2.0 0.0 28.93 MB

Android快速开发框架,MVP架构,丰富的功能、简单的实现、详细的注释、规范的风格。OKHttp、UIL图片加载、ZXing二维码、沉浸状态栏、下载安装、自动缓存以及各种Base、Demo、UI、Util直接用。全新的手势,侧滑返回、全局右滑返回都OUT啦!BaseHttpListActivity,几行代码搞定http请求列表 加载和缓存;BaseView,自定义View竟然如此简单;万能的Entry<K, V>,两个变量的Model/JavaBean再也不用写了;100多个常用style,一行搞定View属性,一键统一配置UI...[详情请看图文介绍]

License: Apache License 2.0

Java 100.00%

android-zblibrary's Introduction

ZBLibrary-Android快速开发框架

GitHub release API Gradle Version License

坐标标准库ZBLibrary,是一个MVP架构的Android快速开发框架,提供一套开发标准(View,Data,Event)以及模板和工具类并规范代码。 封装层级少,简单高效兼容性好。Android Studio、Eclipse多平台支持。

OKHttp、UIL图片加载、ZXing二维码、沉浸状态栏、下载安装、自动缓存以及各种Base、Demo、UI、Util直接用。

全新的手势,侧滑返回、全局右滑返回都OUT啦!

BaseView,自定义View竟然如此简单;

Entry<K, V>,两个变量的Model/JavaBean再也不用写了;

BaseHttpListActivity,几行代码搞定http请求列表 加载和缓存;

还有100多个常用style,一行搞定View属性,一键统一配置UI...

点击右边链接查看如何使用http://my.oschina.net/u/2437072/blog/665241

[以下Gif图看起来比较卡,实际上手机运行很流畅]

用到的开源库

SystemBarTint 系统栏管理器,我把它用在ZBLibrary的BaseActivity中实现了状态栏沉浸。

Android-Universal-Image-Loader 非常强大的图片加载库,我在ZBLibrary中写了一个ImageLoaderUtil来简化使用它。 UIL唯一的缺点是不支持动态加载,需要动态加载建议用Google的Glide。

XListView-Android 下拉刷新、上拉加载的ListView。我修改了部分代码使其支持打开即刷新(带动画)以及自动加载更多(无需上拉)。

OKHttp 很火很强大的Http/Https传输框架。ZBLibrary中的HttpManager对它做了封装(支持自签名Https),Demo中的HttpRequest是使用示例。 注:okio.jar是OKHttp的一部分,不能删除。删除后不会在代码中报错,但运行会出错。

FastJson 阿里巴巴对原生JSON的封装,简化了JSON的使用。ZBLibrary中的Json是对FastJson的简单封装,防止解析异常。

ZXingLib 这是该作者对官方ZXing二维码库的精简版。我做了修改,作为ZBLibrary的QRCodeLibrary。

PagedListView Scroll ListView faster, more accurate and comfortable.

初始化

假设你工程中的Application为zblibrary.demo.application.DemoApplication,并且已在AndroidManifest.xml中注册

    <application
        android:name="zblibrary.demo.application.DemoApplication"
        ...
        >
    </application>

可以用DemoApplication继承BaseApplication

public class DemoApplication extends BaseApplication {
...
}

或 在DemoApplication的 onCreate函数 中调用 BaseApplication.init(this);

public class DemoApplication extends Application {

	@Override
	public void onCreate() {
		super.onCreate();
		
		BaseApplication.init(this);
	}
  ...
}

注册 权限和Activity 等代码可复制ZBLibrary中AndroidManifest.xml里的 <uses-permission/>, <activity/> 等相关代码。

编程**

  • 能复制就复制,节约时间避免出错
  • 保留原本结构,简单上手容易调试
  • 说明随手可得,不用上网或打开文档
  • 增加必要注释,说明功能和使用方法
  • 命名尽量规范,容易查找一看就懂
  • 函数尽量嵌套,减少代码容易修改
  • 最先参数判错,任意调用不会崩溃
  • 代码模块分区,方便浏览容易查找
  • 封装常用代码,方便使用降低耦合
  • 回收多余占用,优化内存提高性能
  • 分包结构合理,模块清晰浏览方便
  • 多用工具和快捷键,增删改查快捷高效

相关推荐

Android快速开发框架-ZBLibrary介绍

如何使用ZBLibrary-Android快速开发框架

仿QQ空间和微信朋友圈,高解耦高复用高灵活

全新的手势,侧滑返回、全局右滑返回都OUT啦!

不一样的Android选择器,简单方便,地址日期时间都好用!

自定义ZXing二维码扫描界面并解决取景框拉伸等问题

零门槛!ZBLibrary仿微信朋友圈自定义View,就是这么简单!

BaseHttpListActivity,几行代码搞定Http列表请求、加载和缓存

ListView滑动不爽,滚动一页得滑几次?该用分页列表啦!

高灵活低耦合Adapter快速开发攻略

万能的Entry,两个变量的Model/JavaBean再也不用写了!

Android HTTPS如何10分钟实现自签名SSL证书

100多个Styles快速开发布局XML,一行搞定View属性,一键统一配置UI...

开发规范

Wiki-Norm

架构、模式、技术

Wiki-Architecture,Pattern,Technology

问题及解决方法

Wiki-FAQ

关于作者

TommyLemon:https://github.com/TommyLemon QQ群:595514898

如果有什么问题或建议可以提ISSUE、加群或者发我邮件,交流技术,分享经验。
如果你解决了某些bug,或者新增了一些通用性强的功能,欢迎贡献代码,感激不尽^_^

下载试用

ZBLibraryDemoApp.apk(ZBLibrary)

APIJSONClientApp.apk(APIJSON+ZBLibrary)

更新日志

https://github.com/TommyLemon/Android-ZBLibrary/commits/master

点Star支持我,点Fork研究它

https://github.com/TommyLemon/Android-ZBLibrary

android-zblibrary's People

Contributors

huimingli avatar tommylemon avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.