Android开源项目第二篇——工具库篇

通过这些项目你可以大幅度减少不必要的开发而将精力放在更重要的地方。 

一、依赖注入DI 
通过依赖注入减少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/ 

二、图片缓存 
1. Android-Universal-Image-Loader 图片缓存 
目前使用最广泛的图片缓存,支持主流图片缓存的绝大多数特性。 
项目地址:https://github.com/nostra13/Android-Universal-Image-Loader 
Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/universal-imageloader-demo.apk?raw=true 
文档介绍:http://www.intexsoft.com/blog/item/74-universal-image-loader-part-3.html 

2. picasso square开源的图片缓存 
项目地址:https://github.com/square/picasso 
文档介绍:http://square.github.io/picasso/ 
特点:(1)可以自动检测adapter的重用并取消之前的下载 
(2)图片变换 
(3)可以加载本地资源 
(4)可以设置占位资源 
(5)支持debug模式 

3. ImageCache 图片缓存,包含内存和Sdcard缓存 
项目地址:https://github.com/Trinea/AndroidCommon 
Demo地址:https://play.google.com/store/apps/details?id=cn.trinea.android.demo 
文档介绍:http://www.trinea.cn/?p=704 
特点:(1)支持预取新图片,支持等待队列 
(2)包含二级缓存,可自定义文件名保存规则 
(3)可选择多种缓存算法(FIFO、LIFO、LRU、MRU、LFU、MFU等13种)或自定义缓存算法 
(4)可方便的保存及初始化恢复数据 
(5)支持不同类型网络处理 
(6)可根据系统配置初始化缓存等 

三、网络相关 
1. Asynchronous Http Client for Android Android异步Http请求 
项目地址:https://github.com/loopj/android-async-http 
文档介绍:http://loopj.com/android-async-http/ 
特点:(1) 在匿名回调中处理请求结果 
(2) 在UI线程外进行http请求 
(3) 文件断点上传 
(4) 智能重试 
(5) 默认gzip压缩 
(6) 支持解析成Json格式 
(7) 可将Cookies持久化到SharedPreferences 

2. android-query 异步加载,更少代码完成Android加载 
项目地址:https://github.com/androidquery/androidquery或https://code.google.com/p/android-query/ 
文档介绍:https://code.google.com/p/android-query/#Why_AQuery? 
Demo地址:https://play.google.com/store/apps/details?id=com.androidquery 
特点:https://code.google.com/p/android-query/#Why_AQuery? 

3. Async Http Client Java异步Http请求 
项目地址:https://github.com/AsyncHttpClient/async-http-client 
文档介绍:http://sonatype.github.io/async-http-client/ 

4. Ion 支持图片、json、http post等异步请求 
项目地址:https://github.com/koush/ion 
文档介绍:https://github.com/koush/ion#more-examples 

5. HttpCache Http缓存 
项目地址:https://github.com/Trinea/AndroidCommon 
Demo地址:https://play.google.com/store/apps/details?id=cn.trinea.android.demo 
Demo代码:https://github.com/Trinea/AndroidDemo/blob/master/src/cn/trinea/android/demo/HttpCacheDemo.java 
特点是:(1) 根据cache-control、expires缓存http请求 
(2) 支持同步、异步Http请求 
(3) 在匿名回调中处理请求结果 
(4) 在UI线程外进行http请求 
(5) 默认gzip压缩 

6. Http Request 
项目地址:https://github.com/kevinsawicki/http-request 
文档介绍:https://github.com/kevinsawicki/http-request#examples 

7. okhttp square开源的http工具类 
项目地址:https://github.com/square/okhttp 
文档介绍:http://square.github.io/okhttp/ 
特点:(1) 支持SPDY(http://zh.wikipedia.org/wiki/SPDY)协议。SPDY协议是Google开发的基于传输控制协议的应用层协议,通过压缩,多路复用(一个TCP链接传送网页和图片等资源)和优先级来缩短加载时间。 
(2) 如果SPDY不可用,利用连接池减少请求延迟 
(3) Gzip压缩 
(4) Response缓存减少不必要的请求 

8. Retrofit RESTFUL API设计 
项目地址:https://github.com/square/retrofit 
文档介绍:http://square.github.io/retrofit/ 

四、数据库 orm工具包 
orm的db工具类,简化建表、查询、更新、插入、事务、索引的操作 
1. greenDAO Android Sqlite orm的db工具类 
项目地址:https://github.com/greenrobot/greenDAO 
文档介绍:http://greendao-orm.com/documentation/ 
官方网站:http://greendao-orm.com/ 
特点:(1)性能佳 
(2) 简单易用的API 
(3) 内存小好小 
(4) 库大小小 

2. ActiveAndroid Android Sqlite orm的db工具类 
项目地址:https://github.com/pardom/ActiveAndroid 
文档介绍:https://github.com/pardom/ActiveAndroid/wiki/_pages 

3. Sprinkles Android Sqlite orm的db工具类 
项目地址:https://github.com/emilsjolander/sprinkles 
文档介绍:http://emilsjolander.github.io/blog/2013/12/18/android-with-sprinkles/ 
特点:比较显著的特点就是配合https://github.com/square/retrofit能保存从服务器获取的数据 

五、Android公共库 
1. Guava Google的基于java1.6的类库集合的扩展项目 
包括collections, caching, primitives support, concurrency libraries, common annotations, string processing, I/O等等. 这些高质量的API可以使你的JAVa代码更加优雅,更加简洁 
项目地址:https://code.google.com/p/guava-libraries/ 
文档介绍:https://code.google.com/p/guava-libraries/wiki/GuavaExplained 

2. AndroidCommon Android公共库 
项目地址:https://github.com/Trinea/AndroidCommon 
Demo地址:https://play.google.com/store/apps/details?id=cn.trinea.android.demo 
文档介绍:http://www.trinea.cn/?p=778 
包括:(1)缓存(图片缓存、预取缓存、网络缓存) 
(2) 公共View(下拉及底部加载更多ListView、底部加载更多ScrollView、滑动一页Gallery) 
(3) Android常用工具类(网络、下载、Android资源操作、shell、文件、Json、随机数、Collection等等) 

六、Android 高版本向低版本兼容 
1. ActionBarSherlock 为Android所有版本提供统一的ActionBar,解决4.0以下ActionBar的适配问题 
项目地址:https://github.com/JakeWharton/ActionBarSherlock 
Demo地址:https://play.google.com/store/apps/details?id=com.actionbarsherlock.sample.demos 
APP示例:太多了。。现在连google都在用 

2. Nine Old Androids 将Android 3.0(Honeycomb)所有动画API(ObjectAnimator ValueAnimator等)兼容到Android1.0 
项目地址:https://github.com/JakeWharton/NineOldAndroids 
Demo地址:https://play.google.com/store/apps/details?id=com.jakewharton.nineoldandroids.sample 
文档介绍:http://nineoldandroids.com/ 

3. HoloEverywhere 将Android 3.0的Holo主题兼容到Android2.1++ 
项目地址:https://github.com/Prototik/HoloEverywhere 
Demo地址:https://raw.github.com/Prototik/HoloEverywhere/repo/org/holoeverywhere/demo/2.1.0/demo-2.1.0.apk 
文档介绍:http://android-developers.blogspot.com/2012/01/holo-everywhere.html 

七、多媒体相关 
1. cocos2d-x 跨平台的2d游戏框架,支持Android、IOS、Linux、Windows等众多平台 
项目地址:https://github.com/cocos2d/cocos2d-x 
文档介绍:http://www.cocos2d-x.org/wiki 
官方网站:http://www.cocos2d-x.org/ 

2. Vitamio 是一款Android与iOS平台上的全能多媒体开发框架 
项目地址:https://github.com/yixia/VitamioBundle 
网站介绍:http://www.vitamio.org/docs/ 
特点:(1) 全面支持硬件解码与GPU渲染 
(2) 能够流畅播放720P甚至1080P高清MKV,FLV,MP4,MOV,TS,RMVB等常见格式的视频 
(3) 在Android与iOS上跨平台支持 MMS, RTSP, RTMP, HLS(m3u8)等常见的多种视频流媒体协议,包括点播与直播。 

3. PhotoProcessing 利用ndk处理图片库,支持Instafix、Ansel、Testino、XPro、Retro、BW、Sepia、Cyano、Georgia、Sahara、HDR、Rotate、Flip 
项目地址:https://github.com/lightbox/PhotoProcessing 
Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/photo-processing.apk?raw=true 

4. Android StackBlur 图片模糊效果工具类 
项目地址:https://github.com/kikoso/android-stackblur 
Demo地址:https://github.com/kikoso/android-stackblur/blob/master/StackBlurDemo/bin/StackBlurDemo.apk?raw=true 
文档介绍:https://github.com/kikoso/android-stackblur#usage 

八、其他 
1. Salvage view 带View缓存的Viewpager PagerAdapter,很方便使用 
项目地址:https://github.com/JakeWharton/salvage 

2. Android-PasscodeLock 应用锁,每次启动或从任何Activity启动应用都需要输入四位数字的密码方可进入 
项目地址:https://github.com/wordpress-mobile/Android-PasscodeLock 
Demo地址:https://play.google.com/store/apps/details?id=com.sothree.umano 
APP示例:Wordpress Android,支付宝,挖财 

3. android-lockpattern Android的图案密码解锁 
项目地址:https://code.google.com/p/android-lockpattern/ 
Demo地址:https://play.google.com/store/apps/details?id=group.pals.android.lib.ui.lockpattern.demo 
使用介绍:https://code.google.com/p/android-lockpattern/wiki/QuickUse 
示例APP:Android开机的图案密码解锁,支付宝的密码解锁 

4. GlowPadBackport将Android4.2的锁屏界面解锁扩展到Android1.6及1.6+ 
项目地址:https://github.com/rock3r/GlowPadBackport 
Demo地址:https://play.google.com/store/apps/details?id=net.sebastianopoggi.samples.ui.GlowPadSample 
效果图:https://lh6.ggpht.com/U070b6Lh6cVsVwx4jN-5nq0xqiB1PBzrYABPeJIEe2hZQ5UWOxc-FDUG77wADelToHA=h310-rw 

5. GlowPadView Android4锁屏界面解锁 
项目地址:https://github.com/nadavfima/GlowPadView 
效果图:https://raw.github.com/nadavfima/GlowPadView/master/example.png 

6. Android Priority Job Queue Android后台任务队列 
项目地址:https://github.com/path/android-priority-jobqueue 
文档介绍:https://github.com/path/android-priority-jobqueue#getting-started 

7. jsoup 一个解析html的java库,可方便的提取和操作数据 
项目地址:https://github.com/jhy/jsoup 
官方网站:http://jsoup.org/ 
作用:(1) 从一个url、文件或string获得html并解析 
(2) 利用dom遍历或css选择器查找、提取数据 
(3) 操作html元素 
(4) 根据白名单去除用于提交的非法数据防止xss攻击 
(5) 输出整齐的html 

8.ZIP java压缩和解压库 
项目地址:https://github.com/zeroturnaround/zt-zip 
文档介绍:https://github.com/zeroturnaround/zt-zip#examples 
作用:(1) 解压和压缩,并支持文件夹内递归操作 
(2) 支持包含和排除某些元素 
(3) 支持重命名元素 
(4) 支持遍历zip包内容 
(5) 比较两个zip包等功能 

9. Cobub Razor 开源的mobile行为分析系统,包括web端、android端,支持ios和window phone 
项目地址:https://github.com/cobub/razor 
Demo地址:http://demo.cobub.com/razor 
网站介绍:http://dev.cobub.com/ 

10. aFileChooser 文件选择器,可内嵌到程序中,而无需使用系统或三方文件选择器。 
项目地址:https://github.com/iPaulPro/aFileChooser 

11. androidpn 基于xmpp协议的消息推送解决方案,包括服务器端和android端。 
项目地址:https://github.com/dannytiehui/androidpn 

12. Android插件式开发 
项目地址:https://github.com/umeng/apf
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
东南亚位于我国倡导推进的“一带一路”海陆交汇地带,作为当今全球发展最为迅速的地区之一,近年来区域内生产总值实现了显著且稳定的增长。根据东盟主要经济体公布的最新数据,印度尼西亚2023年国内生产总值(GDP)增长5.05%;越南2023年经济增长5.05%;马来西亚2023年经济增速为3.7%;泰国2023年经济增长1.9%;新加坡2023年经济增长1.1%;柬埔寨2023年经济增速预计为5.6%。 东盟国家在“一带一路”沿线国家中的总体GDP经济规模、贸易总额与国外直接投资均为最大,因此有着举足轻重的地位和作用。当前,东盟与中国已互相成为双方最大的交易伙伴。中国-东盟贸易总额已从2013年的443亿元增长至 2023年合计超逾6.4万亿元,占中国外贸总值的15.4%。在过去20余年中,东盟国家不断在全球多变的格局里面临挑战并寻求机遇。2023东盟国家主要经济体受到国内消费、国外投资、货币政策、旅游业复苏、和大宗商品出口价企稳等方面的提振,经济显现出稳步增长态势和强韧性的潜能。 本调研报告旨在深度挖掘东南亚市场的增长潜力与发展机会,分析东南亚市场竞争态势、销售模式、客户偏好、整体市场营商环境,为国内企业出海开展业务提供客观参考意见。 本文核心内容: 市场空间:全球行业市场空间、东南亚市场发展空间。 竞争态势:全球份额,东南亚市场企业份额。 销售模式:东南亚市场销售模式、本地代理商 客户情况:东南亚本地客户及偏好分析 营商环境:东南亚营商环境分析 本文纳入的企业包括国外及印尼本土企业,以及相关上下游企业等,部分名单 QYResearch是全球知名的大型咨询公司,行业涵盖各高科技行业产业链细分市场,横跨如半导体产业链(半导体设备及零部件、半导体材料、集成电路、制造、封测、分立器件、传感器、光电器件)、光伏产业链(设备、硅料/硅片、电池片、组件、辅料支架、逆变器、电站终端)、新能源汽车产业链(动力电池及材料、电驱电控、汽车半导体/电子、整车、充电桩)、通信产业链(通信系统设备、终端设备、电子元器件、射频前端、光模块、4G/5G/6G、宽带、IoT、数字经济、AI)、先进材料产业链(金属材料、高分子材料、陶瓷材料、纳米材料等)、机械制造产业链(数控机床、工程机械、电气机械、3C自动化、工业机器人、激光、工控、无人机)、食品药品、医疗器械、农业等。邮箱:market@qyresearch.com

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值