您的位置:首页 > 移动开发 > Android开发

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

2014-01-05 22:49 489 查看


转:http://www.trinea.cn/android/android-open-source-projects-dev-lib/


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

本文为GitHub上那些不错的Android开源项目第二篇——开发工具库篇,主要介绍那些不错的开发库,包括依赖注入框架、图片缓存、网络相关、数据库ORM建模、Android公共库、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/androidqueryhttps://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


Android常用工具类

主要介绍总结的Android开发中常用的工具类,大部分同样适用于Java。

目前包括HttpUtils、DownloadManagerPro、ShellUtils、PackageUtils、PreferencesUtils、JSONUtils、FileUtils、ResourceUtils、StringUtils、ParcelUtils、RandomUtils、ArrayUtils、ImageUtils、ListUtils、MapUtils、ObjectUtils、SerializeUtils、SystemUtils、TimeUtils。

The English version of this article see:Android
Common Utils

 

所有代码都在TrineaAndroidCommon@Github中,欢迎Star或Fork^_*,除这些工具类外此项目还包括缓存、下拉ListView等。详细接口介绍可见TrineaAndroidCommon
API Guide。

具体使用:可直接引入TrineaAndroidCommon作为你项目的library(如何拉取代码及添加公共库),或是自己抽取其中的部分使用。

 

1、HttpUtils

Http网络工具类,主要包括httpGet、httpPost以及http参数相关方法,以httpGet为例:

static HttpResponse httpGet(HttpRequest request)

static HttpResponse httpGet(java.lang.String httpUrl)

static String httpGetString(String httpUrl)

包含以上三个方法,默认使用gzip压缩,使用bufferedReader提高读取速度。

HttpRequest中可以设置url、timeout、userAgent等其他http参数

HttpResponse中可以获取返回内容、http响应码、http过期时间(Cache-Control的max-age和expires)等

前两个方法可以进行高级参数设置及丰富内容返回,第三个方法可以简单的传入url获取返回内容,httpPost类似。更详细的设置可以直接使用HttpURLConnection或apache的HttpClient。

源码可见HttpUtils.java,更多方法及更详细参数介绍可见HttpUtils
Api Guide。

 

2、DownloadManagerPro

Android系统下载管理DownloadManager增强方法,可用于包括获取下载相关信息,如:

getStatusById(long) 得到下载状态

getDownloadBytes(long) 得到下载进度信息

getBytesAndStatus(long) 得到下载进度信息和状态

getFileName(long) 得到下载文件路径

getUri(long) 得到下载uri

getReason(long) 得到下载失败或暂停原因

getPausedReason(long) 得到下载暂停原因

getErrorCode(long) 得到下载错误码

源码可见DownloadManagerPro.java,更多方法及更详细参数介绍可见DownloadManagerPro
Api Guide。关于Android DownManager使用可见DownManager
Demo。

 

3、ShellUtils

Android Shell工具类,可用于检查系统root权限,并在shell或root用户下执行shell命令。如:

checkRootPermission() 检查root权限

execCommand(String[] commands, boolean isRoot, boolean isNeedResultMsg) shell环境执行命令,第二个参数表示是否root权限执行

execCommand(String command, boolean isRoot) shell环境执行命令

源码可见ShellUtils.java,更多方法及更详细参数介绍可见ShellUtils
Api Guide。关于静默安装可见apk-root权限静默安装

 

4、PackageUtils

Android包相关工具类,可用于(root)安装应用、(root)卸载应用、判断是否系统应用等,如:

install(Context, String) 安装应用,如果是系统应用或已经root,则静默安装,否则一般安装

uninstall(Context, String) 卸载应用,如果是系统应用或已经root,则静默卸载,否则一般卸载

isSystemApplication(Context, String) 判断应用是否为系统应用

源码可见PackageUtils.java,更多方法及更详细参数介绍可见ShellUtils
Api Guide。关于静默安装可见apk-root权限静默安装

 

5、PreferencesUtils

Android SharedPreferences相关工具类,可用于方便的向SharedPreferences中读取和写入相关类型数据,如:

putString(Context, String, String) 保存string类型数据

putInt(Context, String, int) 保存int类型数据

getString(Context, String) 获取string类型数据

getInt(Context, String) 获取int类型数据

可通过修改PREFERENCE_NAME变量修改preference name

源码可见PreferencesUtils.java,更多方法及更详细参数介绍可见PreferencesUtils
Api Guide。

 

6、JSONUtils

JSONUtils工具类,可用于方便的向Json中读取和写入相关类型数据,如:

String getString(JSONObject jsonObject, String key, String defaultValue) 得到string类型value

String getString(String jsonData, String key, String defaultValue) 得到string类型value

表示从json中读取某个String类型key的值

 

getMap(JSONObject jsonObject, String key) 得到map

getMap(String jsonData, String key) 得到map

表示从json中读取某个Map类型key的值

源码可见JSONUtils.java,更多方法及更详细参数介绍可见JSONUtils
Api Guide。

 

7、FileUtils

文件工具类,可用于读写文件及对文件进行操作。如:

readFile(String filePath) 读文件

writeFile(String filePath, String content, boolean append) 写文件

getFileSize(String path) 得到文件大小

deleteFile(String path) 删除文件

源码可见FileUtils.java,更多方法及更详细参数介绍可见FileUtils
Api Guide。

 

8、ResourceUtils

Android Resource工具类,可用于从android资源目录的raw和assets目录读取内容,如:

geFileFromAssets(Context context, String fileName) 得到assets目录下某个文件内容

geFileFromRaw(Context context, int resId) 得到raw目录下某个文件内容

源码可见ResourceUtils.java,更多方法及更详细参数介绍可见ResourceUtils
Api Guide。

 

9、StringUtils

String工具类,可用于常见字符串操作,如:

isEmpty(String str) 判断字符串是否为空或长度为0

isBlank(String str) 判断字符串是否为空或长度为0 或由空格组成

utf8Encode(String str) 以utf-8格式编码

capitalizeFirstLetter(String str) 首字母大写

源码可见StringUtils.java,更多方法及更详细参数介绍可见StringUtils
Api Guide。

 

10、ParcelUtils

Android Parcel工具类,可用于从parcel读取或写入特殊类型数据,如:

readBoolean(Parcel in) 从pacel中读取boolean类型数据

readHashMap(Parcel in, ClassLoader loader) 从pacel中读取map类型数据

writeBoolean(boolean b, Parcel out) 向parcel中写入boolean类型数据

writeHashMap(Map<K, V> map, Parcel out, int flags) 向parcel中写入map类型数据

源码可见ParcelUtils.java,更多方法及更详细参数介绍可见ParcelUtils
Api Guide。

 

11、RandomUtils

随机数工具类,可用于获取固定大小固定字符内的随机数,如:

getRandom(char[] sourceChar, int length) 生成随机字符串,所有字符均在某个字符串内

getRandomNumbers(int length) 生成随机数字

源码可见RandomUtils.java,更多方法及更详细参数介绍可见RandomUtils
Api Guide。

 

12、ArrayUtils

数组工具类,可用于数组常用操作,如:

isEmpty(V[] sourceArray) 判断数组是否为空或长度为0

getLast(V[] sourceArray, V value, V defaultValue, boolean isCircle) 得到数组中某个元素前一个元素,isCircle表示是否循环

getNext(V[] sourceArray, V value, V defaultValue, boolean isCircle) 得到数组中某个元素下一个元素,isCircle表示是否循环

源码可见ArrayUtils.java,更多方法及更详细参数介绍可见ArrayUtils
Api Guide。

 

13、ImageUtils

图片工具类,可用于Bitmap, byte array, Drawable之间进行转换以及图片缩放,目前功能薄弱,后面会进行增强。如:

bitmapToDrawable(Bitmap b) bimap转换为drawable

drawableToBitmap(Drawable d) drawable转换为bitmap

drawableToByte(Drawable d) drawable转换为byte

scaleImage(Bitmap org, float scaleWidth, float scaleHeight) 缩放图片

源码可见ImageUtils.java,更多方法及更详细参数介绍可见ImageUtils
Api Guide。

 

14、ListUtils

List工具类,可用于List常用操作,如:

isEmpty(List<V> sourceList) 判断List是否为空或长度为0

join(List<String> list, String separator) List转换为字符串,并以固定分隔符分割

addDistinctEntry(List<V> sourceList, V entry) 向list中添加不重复元素

源码可见ListUtils.java,更多方法及更详细参数介绍可见ListUtils
Api Guide。

 

15、MapUtils

Map工具类,可用于Map常用操作,如:

isEmpty(Map<K, V> sourceMap) 判断map是否为空或长度为0

parseKeyAndValueToMap(String source, String keyAndValueSeparator, String keyAndValuePairSeparator, boolean ignoreSpace) 字符串解析为map

toJson(Map<String, String> map) map转换为json格式

源码可见MapUtils.java,更多方法及更详细参数介绍可见MapUtils
Api Guide。

 

16、ObjectUtils

Object工具类,可用于Object常用操作,如:

isEquals(Object actual, Object expected) 比较两个对象是否相等

compare(V v1, V v2) 比较两个对象大小

transformIntArray(int[] source)  Integer 数组转换为int数组

源码可见ObjectUtils.java,更多方法及更详细参数介绍可见ObjectUtils
Api Guide。

 

17、SerializeUtils

序列化工具类,可用于序列化对象到文件或从文件反序列化对象,如:

deserialization(String filePath) 从文件反序列化对象

serialization(String filePath, Object obj) 序列化对象到文件

源码可见SerializeUtils.java,更多方法及更详细参数介绍可见SerializeUtils
Api Guide。

 

18、SystemUtils

系统信息工具类,可用于得到线程池合适的大小,目前功能薄弱,后面会进行增强。如:

getDefaultThreadPoolSize() 得到跟系统配置相符的线程池大小

源码可见SystemUtils.java,更多方法及更详细参数介绍可见SystemUtils
Api Guide。

 

19、TimeUtils

时间工具类,可用于时间相关操作,如:

getCurrentTimeInLong() 得到当前时间

getTime(long timeInMillis, SimpleDateFormat dateFormat) 将long转换为固定格式时间字符串

源码可见TimeUtils.java,更多方法及更详细参数介绍可见TimeUtils
Api Guide。

Android开源项目第四篇——开发及测试工具篇

1、Buck

facebook开源的Android编译工具,效率是ant的两倍。主要优点在于:

(1) 加快编译速度,通过并行利用多核cpu和跟踪不变资源减少增量编译时间实现

(2) 可以在编译系统中生成编译规则而无须另外的系统生成编译规则文件

(3) 编译同时可生成单元测试结果

(4) 既可用于IDE编译也可用于持续集成编译

(5) facebook持续优化中

项目地址:https://github.com/facebook/buck

 

2、Android Maven Plugin

Android Maven插件,可用于对android三方依赖进行管理。在J2EE开发中,maven是非常成熟的依赖库管理工具,可统一管理依赖库。

项目地址:https://github.com/jayway/maven-android-plugin

 

3、Spoon

可用于android不同机型设备自动化测试,能将应用apk和测试apk运行在不同机器上并生成相应测试报告。

项目地址:https://github.com/square/spoon

 

4、Android FEST

提供一些列方便的断言,可用于提高编写Android自测代码效率

项目地址:https://github.com/square/fest-android

 

5、SelectorChapek for Android

Android Studio插件,可根据固定文件名格式资源自动生成drawable selectors xml文件。

项目地址:https://github.com/inmite/android-selector-chapek

 

6、Android Resource Navigator

chrome插件,可以方便的查看github上android源码工程的styles.xml和themes.xml。主要功能:

(1) 快速打开android styles.xml themes.xml

(2) 方便在资源间跳转。styles.xml themes.xml文件中资源链接跳转,可以方便跳转到某个资源

(3) 方便查找某个style和theme。chrome地址栏输入arn+tab+搜索内容回车即可

(4) 自动下载不同分辨率下的drawable

(5) 通过映射查找那些不是按照固定命名规则命名的style和theme

项目地址:https://github.com/jgilfelt/android-resource-navigator

示例:https://chrome.google.com/webstore/detail/android-resource-navigato/agoomkionjjbejegcejiefodgbckeebo?hl=en&gl=GB

 

7、Android Action Bar Style Generator

Android ActionBar样式生成器,可在线选择ActionBar样式自动生成所需要的图片资源及xml文件

项目地址:https://github.com/jgilfelt/android-actionbarstylegenerator

在线演示:http://jgilfelt.github.io/android-actionbarstylegenerator/

 

8、ViewServer

允许app运行在任何手机上都可以用HierarchyViewer查看

项目地址:https://github.com/romainguy/ViewServer

 

9、GridWichterle for Android

在整个系统上显示一个grid,用来帮助查看应用布局及使得布局更美观,可设置grid网格大小和颜色,android推荐48dp和8dp,可见 Android Design Guidelines – Metrics and Grids

项目地址:https://github.com/inmite/android-grid-wichterle

APK地址:https://play.google.com/store/apps/details?id=eu.inmite.android.gridwichterle

PS:比起hierarchyviewer相差甚远,不过偶尔可用来作为布局查看工具。

 

10、渠道打包工具

允许app运行在任何手机上都可以用HierarchyViewer查看

项目地址:https://github.com/umeng/umeng-muti-channel-build-tool

另可参见Google的构建系统Gradle:http://tools.android.com/tech-docs/new-build-system/user-guide

 

11、Catlog

手机端log查看工具,支持不同颜色显示、关键字过滤、级别过滤、进程id过滤、录制功能等

项目地址:https://github.com/nolanlawson/Catlog

在线演示:https://play.google.com/store/apps/details?id=com.nolanlawson.logcat

 

12、PID Cat

根据package查看logcat日志

项目地址:https://github.com/JakeWharton/pidcat

 

13、Hugo

用于打印函数信息及执行时间的工具,仅在debug模式生效

项目地址:https://github.com/JakeWharton/hugo

Android开源项目第五篇——优秀个人和团体篇

一、个人

1. JakeWharton 就职于Square

Github地址:https://github.com/JakeWharton

代表作:ActionBarSherlock,Android-ViewPagerIndicator,Nine Old Androids,SwipeToDismissNOA,hugo,butterknife,Android-DirectionalViewPager

pidcat另外对square及其他开源项目有很多贡献

博客:http://jakewharton.com/

绝对牛逼的大神,项目主要集中在Android版本兼容,ViewPager及开发工具上.

 

2. Chris Banes

Github地址:https://github.com/chrisbanes

代表作:ActionBar-PullToRefresh,PhotoView,Android-BitmapCache,Android-PullToRefresh

博客:http://chris.banes.me/

 

3. Koushik Dutta就职于ClockworkMod

Github地址:https://github.com/koush

代表作:Superuser,AndroidAsync,UrlImageViewHelper,ion, 另外对https://github.com/CyanogenMod的开源项目有很多贡献

博客:http://koush.com/

 

4. Simon Vig

Github地址:https://github.com/SimonVT

代表作:android-menudrawer,MessageBar

博客:http://simonvt.net/

 

5. Manuel Peinado

Github地址:https://github.com/ManuelPeinado

代表作:FadingActionBar,GlassActionBar,RefreshActionItem,QuickReturnHeader

 

6. Emil Sjölander

Github地址:https://github.com/emilsjolander

代表作:StickyListHeaders,sprinkles,android-FlipView

博客:http://emilsjolander.se/

 

7. greenrobot

Github地址:https://github.com/greenrobot

代表作:greenDAO,EventBus

网址:http://greenrobot.de/

 

8. Jeff Gilfelt

Github地址:https://github.com/jgilfelt

代表作:android-mapviewballoons,android-viewbadger,android-actionbarstylegenerator,android-sqlite-asset-helper

网址:http://jeffgilfelt.com

 

Android开源项目第三篇——优秀项目篇

Linux

项目地址:https://github.com/torvalds/linux

Android

项目地址:https://android.googlesource.com/或https://github.com/android

以上两个项目,不解释

 

(1) ZXing 二维码扫描工具

项目地址:https://github.com/zxing/zxing或https://code.google.com/p/zxing/

APK地址:https://play.google.com/store/apps/details?id=com.google.zxing.client.android

PS:现在市面上很多应用的二维码扫描功能都是从这个修改而来

 

(2) photup 编辑机批量上传照片到facebook上

项目地址:https://github.com/chrisbanes/photup

APK地址:https://play.google.com/store/apps/details?id=uk.co.senab.photup

PS:代码分包合理,很棒。不过这个项目依赖的开源项目比较多,比较难编译

 

(3) Github的Android客户端项目

项目地址:https://github.com/github/android

APK地址:https://play.google.com/store/apps/details?id=com.github.mobile

 

(4) MIUI便签

项目地址:https://github.com/MiCode/Notes

APK地址:https://github.com/Trinea/TrineaDownload/blob/master/miui-note-demo.apk?raw=true

PS:项目分包比较合理,相比较miui的文件管理器https://github.com/MiCode/FileExplorer代码规范较好得多

 

(5) 四次元-新浪微博客户端

项目地址:https://github.com/qii/weiciyuan

APK地址:https://play.google.com/store/apps/details?id=org.qii.weiciyuan

 

(6) gnucash-一个记账理财软件

项目地址:https://github.com/codinguser/gnucash-android

APK地址:http://play.google.com/store/apps/details?id=org.gnucash.android

 

(7) AntennaPod支持rss订阅、音乐订阅

项目地址:https://github.com/danieloeh/AntennaPod

APK地址:https://play.google.com/store/apps/details?id=de.danoeh.antennapod

 

(8) ChaseWhisplyProject 打鬼游戏

项目地址:https://github.com/tvbarthel/ChaseWhisplyProject

APK地址:https://play.google.com/store/apps/details?id=fr.tvbarthel.games.chasewhisply

 

(9) Tweet Lanes 功能完整的Twitter客户端

项目地址:https://github.com/chrislacy/TweetLanes

APK地址:https://play.google.com/store/apps/details?id=com.tweetlanes.android
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: