通过依赖注入减少View、服务、资源简化初始化,事件绑定等重复繁琐工作
1. AndroidAnnotations(Code Diet) android快速开发框架
项目地址:https://github.com/excilys/androidannotations
文档介绍:https://github.com/excilys/androidannotations/wiki
官方网站:http://androidannotations.org/
特点:(1)依赖注入:包括view,extras,系统服务,资源等等
(2)简单的线程模型,通过annotation表示方法运行在ui线程还是后台线程
(3)事件绑定:通过annotation表示view的响应事件,不用在写内部类
(4)REST客户端:定义客户端接口,自动生成REST请求的实现
(5)没有你想象的复杂:AndroidAnnotations只是在在编译时生成相应子类
(6)不影响应用性能:仅50kb,在编译时完成,不会对运行时有性能影响。
PS:与roboguice的比较:roboguice通过运行时读取annotations进行反射,所以可能影响应用性能,而AndroidAnnotations在编译时生成子类,所以对性能没有影响

2. roboguice 帮你处理了很多代码异常,利用annotation使得更少的代码完成项目
项目地址:https://github.com/roboguice/roboguice
文档介绍:https://github.com/roboguice/roboguice/wiki

3. butterknife 利用annotation帮你快速完成View的初始化,减少代码
项目地址:https://github.com/JakeWharton/butterknife
文档介绍:http://jakewharton.github.io/butterknife/

4. Dagger 依赖注入,适用于Android和Java
项目地址:https://github.com/square/dagger
文档介绍:http://square.github.io/dagger/

Android开源项目发现--- 工具类依赖注入DI篇(持续更新)的更多相关文章

  1. Android开源项目发现--- 工具类网络相关篇(持续更新)

    1. Asynchronous Http Client for Android Android异步Http请求 项目地址:https://github.com/loopj/android-async- ...

  2. Android开源项目发现--- 工具类快速开发篇(持续更新)

    1. Guava Google的基于java1.6的类库集合的扩展项目 包括collections, caching, primitives support, concurrency librarie ...

  3. Android开源项目发现--- 工具类数据库ORM篇(持续更新)

    orm的db工具类,简化建表.查询.更新.插入.事务.索引的操作 1. greenDAO Android Sqlite orm的db工具类 项目地址:https://github.com/greenr ...

  4. Android开源项目发现--- 工具类图片缓存篇(持续更新)

    1. Android-Universal-Image-Loader 图片缓存 目前使用最广泛的图片缓存,支持主流图片缓存的绝大多数特性. 项目地址:https://github.com/nostra1 ...

  5. Android开源项目发现--- 工具类Log篇(持续更新)

    1.Catlog 手机端log查看工具,支持不同颜色显示.关键字过滤.级别过滤.进程id过滤.录制功能等 项目地址:https://github.com/nolanlawson/Catlog 在线演示 ...

  6. Android开源项目发现--- 工具类向下兼容篇(持续更新)

    1. ActionBarSherlock 为Android所有版本提供统一的ActionBar,解决4.0以下ActionBar的适配问题 项目地址:https://github.com/JakeWh ...

  7. Android开源项目发现--- 工具类文件处理篇(持续更新)

    1.ZIP java压缩和解压库 项目地址:https://github.com/zeroturnaround/zt-zip 文档介绍:https://github.com/zeroturnaroun ...

  8. Android开源项目大全 - 工具类

    主要包括那些不错的开发库,包括依赖注入框架.图片缓存.网络相关.数据库ORM建模.Android公共库.Android 高版本向低版本兼容.多媒体相关及其他. 一.依赖注入DI 通过依赖注入减少Vie ...

  9. Android开源项目发现---Spinner选择器与日历选择器篇(持续更新)

    1. android-times-square Android日历部件 支持选取单个日期,多个日期,及日期区间段和对话框形式显示 项目地址:https://github.com/square/andr ...

随机推荐

  1. 前后端分离--构建前端Mock Server--windows部署rap

    mock:模拟的,虚假的 mock server:模拟服务,模拟请求,模拟虚假数据 为了前后端更好的分工,接口文档是必须的,前后端都根据接口文档写代码,然后对接接口就行了. 但是,后端跟不上前端节奏, ...

  2. org.hibernate.HibernateException: No CurrentSessionContext configured!

    hibernate可以通过两种方式获得Session: getCurrentSession() 和openSession(). 当通过getCurrentSession()方法时,需要在 hibern ...

  3. Binary Tree Level Order Traversal II 解题思路

    思路: 与Binary Tree Level Order Traversal I 几乎一样.只是最后将结果存放在栈里,然后在栈里再传给向量即可. 再次总结思路: 两个queue,先把第一个放进q1,循 ...

  4. php 目录及文件操作

    // bool is_dir(string $filename) 判断给定文件名是否是一个目录.// resource opendir(string $path[,resource $context] ...

  5. compser 执行命令提示do not run composer as root/super !

    这个是因为composer为了防止非法脚本在root下执行,解决办法随便切换到非root用户即可

  6. Day19 Django之Form表单验证、CSRF、Cookie、Session和Model操作

    一.Form表单验证 用于做用户提交数据的验证1.自定义规则 a.自定义规则(类,字段名==html中的name值)b.数据提交-规则进行匹配代码如下: """day19 ...

  7. awk基础 [马哥视频]

    awk基础 1.1 print print的使用格式: print item1,item2, …. 要点: 各项目自己使用逗号隔开,而输出时则以空白字符分隔: 输出的item可以为字符串或者数值,当前 ...

  8. 安装python-MySQLdb 出现error: command 'gcc' failed with exit status 1的解决方法

    >>> yum install MySQL-p* >>>yum install python-devel >>>cd MySQL-python-1 ...

  9. mysql申请账户

    INSERT INTO mysql.user set Host='%',user='alipay',password=password('alipay'),Select_priv='Y',Insert ...

  10. C#编写自动关机程序复习的知识

    首先一个程序第一要素是logo 在设置里面可以设置程序图标,在ICON里设置. ICON图标可以在网上下载. 这些都是表面功夫 程序中涉及到Buton.Label.Timer.Notiflcon控件 ...