Android开源项目- 集锦
转载:如需转载请标明出处:https://github.com/Trinea/android-open-project
Android 开源项目第一篇——个性化控件(View)篇
包括ListView、ActionBar、Menu、ViewPager、Gallery、GridView、ImageView、ProgressBar、TextView、ScrollView、TimeView、TipView、FlipView、ColorPickView、GraphView、UI Style、其他
Android 开源项目第二篇——工具库篇
包括依赖注入、图片缓存、网络请求、数据库 ORM 工具包、Android 公共库、高版本向低版本兼容库、多媒体、事件总线、传感器、安全、插件化、文件、其他
Android 开源项目第三篇——优秀项目篇
比较有意思的完整的 Android 项目
Android 开源项目第四篇——开发及测试工具篇
包括开发效率工具、开发自测相关、测试工具、开发及编译环境、其他
Android 开源项目第五篇——优秀个人和团体篇
乐于分享并且有一些很不错的开源项目的个人和组织,包括 JakeWharton、Chris Banes、Koushik Dutta 等大牛
第一部分 个性化控件(View)
主要介绍那些不错个性化的 View,包括 ListView、ActionBar、Menu、ViewPager、Gallery、GridView、ImageView、ProgressBar、TextView、ScrollView、TimeView、TipView、FlipView、ColorPickView、GraphView、UI Style 等等。
一、ListView
android-pulltorefresh
一个强大的拉动刷新开源项目,支持各种控件下拉刷新,ListView、ViewPager、WebView、ExpandableListView、GridView、ScrollView、Horizontal ScrollView、Fragment 上下左右拉动刷新,比下面 johannilsson 那个只支持 ListView 的强大的多。并且它实现的下拉刷新 ListView 在 item 不足一屏情况下也不会显示刷新提示,体验更好。
项目地址:https://github.com/chrisbanes/Android-PullToRefresh
Demo 地址:https://github.com/Trinea/TrineaDownload/blob/master/pull-to-refreshview-demo.apk?raw=true
APP 示例:新浪微博各个页面
android-pulltorefresh-listview
下拉刷新 ListView,这个被很多人使用的项目实际有不少 bug,推荐使用 android-Ultra-Pull-to-Refresh
项目地址:https://github.com/johannilsson/android-pulltorefresh
Demo 地址:https://github.com/Trinea/TrineaDownload/blob/master/pull-to-refresh-listview-demo.apk?raw=true
android-Ultra-Pull-to-Refresh
下拉刷新,第一个项目已经停止维护了,并且使用起来相对复杂,定制性也差。这个是替代和改良方案。这个继承于 ViewGroup 可以包含任何 View。功能甚至比 SwipeRefreshLayout 强大。使用起来非常简单。良好的设计,如果你想定制自己的 UI 样式,非常简单,就像给 ListView 加一个 Header View 那么简单。支持 API LEVEL >= 8
项目地址:https://github.com/liaohuqiu/android-Ultra-Pull-To-Refresh
原理剖析文档:android-Ultra-Pull-to-Refresh
Demo 地址:https://raw.githubusercontent.com/liaohuqiu/android-Ultra-Pull-To-Refresh/master/ptr-demo.apk
效果图:
http://srain-github.qiniudn.com/ultra-ptr/release-to-refresh.gif
http://srain-github.qiniudn.com/ultra-ptr/auto-refresh.gif
http://srain-github.qiniudn.com/ultra-ptr/store-house-string-array.gif
4、Android-PullToRefreshRecyclerView
支持下拉刷新的RecyclerView,同时支持滑动到底部自动加载数据、给RecyclerView添加Header。并且不更改原有RecyclerView的逻辑。
5、DragSortListView
拖動排序的ListView,同時支持ListView滑動item刪除,各個Item高度不一、單選、複選、CursorAdapter做爲適配器、拖動背景變化等
項目地址:https://github.com/bauerca/drag-sort-listview
Demo地址:https://play.google.com/store/apps/details?id=com.mobeta.android.demodslv
APP示例:Wordpress Android
6、SwipeListView
支持定义 ListView 左右滑动事件,支持左右滑动位移,支持定义动画时间
项目地址:https://github.com/47deg/android-swipelistview
Demo 地址:https://play.google.com/store/apps/details?id=com.fortysevendeg.android.swipelistview
APP示例:微信
7、SlideAndDragListView
支持ListView的Item的拖动排序、左右滑动事件,可自定义左右滑动显示文字、图标、位移,同时支持onItemClick、onItemLongClick等监听器,提供丰富的回调接口。
项目地址:https://github.com/yydcdut/SlideAndDragListView
Demo 地址:https://github.com/yydcdut/SlideAndDragListView/blob/master/apk/sdlv.apk?raw=true
APP 示例:Android 手机QQ 5.0
8、RecyclerViewSwipeDismiss
輕量級支持support-v7中的RecyclerView的滑動刪除(Swipe to dismiss)行為,不需要修改源代碼,只要間單的邦定onTouchListener
項目地址:https://github.com/CodeFalling/RecyclerViewSwipeDismiss
9、Android-SwipeToDismiss
滑動Item消失ListView
項目地址:https://github.com/romannurik/Android-SwipeToDismiss
支持3.0以下版本見:https://github.com/JakeWharton/SwipeToDismissNOA
Demo地址:https://github.com/JakeWharton/SwipeToDismissNOA/SwipeToDismissNOA.apk/qr_code
10、StickyListHeaders
GroupName滑動到頂端時會固定不動直到另外一個GroupName到達頂端的ExpandListView,支持快速滑動,支持Android2.3及以上
項目地址:https://github.com/emilsjolander/StickyListHeaders
APP示例:Android 4.0聯系人
11、pinned-section-listview
GroupName滑動到頂端時會固定不動直到另外一個GroupName到達頂端的ExpandListView
項目地址:https://github.com/beworker/pinned-section-listview
效果图
12、PinnedHeaderListView
GroupName滑動到頂端時會固定不動直到另外一個GroupName到達頂端的ExpandListView
項目地址:https://github.com/JimiSmith/PinnedHeaderListView
13、QuickReturnHeader
ListView/ScrollView的header或footer,當向下滾動時消失,向上滾動時出現
項目地址:https://github.com/ManuelPeinado/QuickReturnHeader
Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/quick-return-header-demo.apk?raw=true
APP示例:google plus
14、IndexableListView
ListView右側會顯示item首字母快捷索引,點擊可快速滑動到某個item
項目地址:https://github.com/woozzu/IndexableListView
Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/indexable-listview.apk?raw=true
APP示例:微信通訊錄、小米聯系人
15、CustomFastScrollView
ListView快速滑動,同時屏幕中間PopupWindows顯示滑動到的item內容或首字母
項目地址:https://github.com/nolanlawson/CustomFastScrollViewDemo
16、Android-ScrollBarPanel
ListView滑動時固定的Panel指示顯示在scrollbar旁邊
项目地址:https://github.com/rno/Android-ScrollBarPanel
效果展示:https://github.com/rno/Android-ScrollBarPanel/raw/master/demo_capture.png
17、SlideExpandableListView
用户点击 listView item 滑出固定区域,其他 item 的区域收缩
项目地址:https://github.com/tjerkw/Android-SlideExpandableListView
Demo 地址:https://github.com/Trinea/TrineaDownload/blob/master/slide-expandable-listView-demo.apk?raw=true
18、JazzyListView
ListView 及 GridView item 以特殊动画效果进入屏幕,效果包括 grow、cards、curl、wave、flip、fly 等等
项目地址:https://github.com/twotoasters/JazzyListView
Demo 地址:https://play.google.com/store/apps/details?id=com.twotoasters.jazzylistview.sample
在线演示:http://lab.hakim.se/scroll-effects/
19、ListViewAnimations
带 Item 显示动画的 ListView,动画包括底部飞入、其他方向斜飞入、下层飞入、渐变消失、滑动删除等
项目地址:https://github.com/nhaarman/ListViewAnimations
Demo 地址:https://play.google.com/store/apps/details?id=com.haarman.listviewanimations
APP 示例:Google plus、Google Now 卡片式进入、小米系统中应用商店、联系人、游戏中心、音乐、文件管理器的 ListView、Ultimate、Light Flow Lite、TreinVerkeer、Running Coach、Pearl Jam Lyrics、Calorie Chart、Car Hire、Super BART、DK FlashCards、Counter Plus、Voorlees Verhaaltjes 2.0
20、DevsmartLib-Android
横向 ListView
项目地址:https://github.com/dinocore1/DevsmartLib-Android
Demo 地址:https://github.com/Trinea/TrineaDownload/blob/master/horizontal-listview-demo.apk?raw=true
21、TwoWayView
横向 ListView 的效果,继承自 AdapterView
项目地址:https://github.com/lucasr/twoway-view
22、HorizontalVariableListView
支持 Item 宽度不一致的 ListView
项目地址:https://github.com/sephiroth74/HorizontalVariableListView
23、LinearListView
用 LinearLayout 实现的 ListView,可解决多个 ListView 并存等问题。目前自己也有需要,等亲自尝试过后会再具体介绍
项目地址:https://github.com/frankiesardo/LinearListView
24、MultiChoiceAdapter
支持多选的 ListView Adapter
项目地址:https://github.com/ManuelPeinado/MultiChoiceAdapter
Demo 地址:https://play.google.com/store/apps/details?id=com.manuelpeinado.multichoiceadapter.demo
25、EnhancedListView
支持横向滑动删除列表项以及撤销删除的 ListView,该项目的前身是SwipeToDismissUndoList
项目地址:https://github.com/timroes/EnhancedListView
Demo 地址:https://play.google.com/store/apps/details?id=de.timroes.android.listviewdemo&rdid=de.timroes.android.listviewdemo
26、ListBuddies
自动滚动的双列 ListView ,两个 ListView 滚动速度不一致,有视差效果
项目地址:https://github.com/jpardogo/ListBuddies
Demo 地址:https://play.google.com/store/apps/details?id=com.jpardogo.android.listbuddies
效果图:
27、SwipeMenuListView
针对 ListView item 的侧滑菜单
项目地址:https://github.com/baoyongzhang/SwipeMenuListView
28、PagingListView
分页加载的 ListView。当滑动到 ListView 底部最后一个元素时,显示一个进度行,然后加载下一页数据,并显示。
项目地址:https://github.com/nicolasjafelle/PagingListView
29、PullZoomView
支持下拉时 HeaderView 缩放的 ListView、ScrollView
项目地址:https://github.com/Frank-Zhu/PullZoomView
30、PullToZoomInListView
滑动 ListView 时使其 HeaderView 跟随滑动缩放
项目地址:https://github.com/matrixxun/PullToZoomInListView
31、CalendarListview
实现每个月一行日历效果的 ListView
项目地址:https://github.com/traex/CalendarListview
原理剖析文档:CalendarListview
32、sticky-headers-recyclerview
GroupName 滑动到顶端时会固定不动直到另外一个 GroupName 到达顶端的 ListView,采用 support-v7 中的 RecyclerView 实现
项目地址:https://github.com/timehop/sticky-headers-recyclerview
33、PullSeparateListView
到达顶部或底部继续拉动时,实现 Item 间的相互分离,两种模式:(1) 全部分离的模式,即屏幕内所有 Item 都会分离 (2)部分分离模式,以点击位置为分界点,部分 item 分离
项目地址:https://github.com/chiemy/PullSeparateListView
34、ExpandableLayout
Header 和 Content Item 都可以展开的 ExpandableListview
项目地址:https://github.com/traex/ExpandableLayout
35、PagedHeadListView
支持 paginated header 以及 material page indicator 的 ListView.
项目地址:https://github.com/JorgeCastilloPrz/PagedHeadListView
36、CustomSwipeListView
支持左滑弹出自定义菜单,右滑删除且允许撤销,同时可以自定义滑动动画时间和滑动触发事件的时机等。
项目地址:https://github.com/xyczero/Android-CustomSwipeListView
Demo 地址:Download here
效果图:
37、Pull-to-Refresh.Rentals-Android
提供一个简单可以自定义的下拉刷新实现,Yalantis 出品。
项目地址:https://github.com/Yalantis/Pull-to-Refresh.Rentals-Android
效果图:
38、ScrollerCalendar
实现每行显示一年的 12 个月份的 RecyclerView 年历
项目地址:https://github.com/guanchao/ScrollerCalendar
39、ExtractWordView
一个可以提取单词的 ListView,支持”放大镜”效果。
项目地址:https://github.com/jcodeing/ExtractWordView
Demo 地址:Download here
40、FlyRefresh
支持 ListView, GridView, RecyclerView, ScrollView 的下拉刷新
项目地址:https://github.com/race604/FlyRefresh
41、MVCHelper
实现下拉刷新,滚动底部自动加载更多,分页加载,自动切换显示网络失败布局,暂无数据布局,支持任意 view,真正的 MVC 架构
支持切换主流下拉刷新框架 Android-PullToRefresh-Library,android-Ultra-Pull-To-Refresh-library,SwipeRefreshLayout
项目地址:https://github.com/LuckyJayce/MVCHelper
Demo 地址:https://github.com/LuckyJayce/MVCHelper/blob/master/raw/MVCHelper_Demo.apk?raw=true
42、RecyclerViewSwipeDismiss
支持滑动 Item 操作、点击展开、拖动排序、展开后拖动排序等特性的 RecyclerView
项目地址:https://play.google.com/store/apps/details?id=com.h6ah4i.android.example.advrecyclerview
视频:http://www.youtube.com/watch?feature=player_embedded&v=S7cSwMArjUQ
43、WaterDropListView
模仿 iOS 下拉刷新“水滴”效果,支持下拉刷新和上拉加载
项目地址:https://github.com/THEONE10211024/WaterDropListView
效果图展示:https://github.com/THEONE10211024/WaterDropListView/blob/master/demo/demo.gif
44、PopupListView
實現ListItem 點擊後置頂並可顯示客製化添加的item的內部View 的ListView
项目地址:https://github.com/s8871404/PopupListView
Demo 地址:https://play.google.com/store/apps/details?id=com.baobomb.popuplistview_sample
效果图:https://github.com/s8871404/PopupListView/blob/master/example.gif
45、CircleRefreshLayout
一个包含有趣的动画的自定义下拉刷新布局
项目地址:https://github.com/tuesda/CircleRefreshLayout
效果图:
三、Menu
1、MenuDrawer
滑出式菜单,通过拖动屏幕边缘滑出菜单,支持屏幕上下左右划出,支持当前 View 处于上下层,支持 Windows 边缘、ListView 边缘、ViewPager 变化划出菜单等。
项目地址:https://github.com/SimonVT/android-menudrawer
Demo 地址:http://simonvt.github.io/android-menudrawer/
APP 示例:Gmail、Google Music 等大部分 google app
2、SlidingMenu
滑出式菜单,通过拖动屏幕边缘滑出菜单,支持屏幕左右划出,支持菜单 zoom、scale、slide up 三种动画样式出现。与 MenuDrawer 相比而言,SlidingMenu 支持菜单动画样式出现,MenuDrawer 支持菜单 view 处于内容的上下层
项目地址:https://github.com/jfeinstein10/SlidingMenu
原理剖析文档:SlidingMenu
Demo 地址:https://play.google.com/store/apps/details?id=com.slidingmenu.example
APP 示例:Foursquare, LinkedIn, Zappos, Rdio, Evernote Food, Plume, VLC for Android, ESPN ScoreCenter, MLS MatchDay, 9GAG, Wunderlist 2, The Verge, MTG Familiar, Mantano Reader, Falcon Pro (BETA), MW3 Barracks
3、Android Wheel Menu
圆形旋转选取菜单
项目地址:https://github.com/anupcowkur/Android-Wheel-Menu
4、AndroidResideMenu
仿 Dribbble 的边栏菜单
项目地址:https://github.com/SpecialCyCi/AndroidResideMenu
5、CircularFloatingActionMenu
一个可定制的圆形的浮动菜单控件,类似于 Path 的圆形菜单。这个控件的可定制性更强,可以很容易的定制菜单出现消失时的动画,起始角度和半径。
项目地址:https://github.com/oguzbilgener/CircularFloatingActionMenu
原理剖析文档:CircularFloatingActionMenu
Demo 地址:https://github.com/oguzbilgener/CircularFloatingActionMenu/tree/master/samples
6、DragLayout
使用 support.v4 包下的 ViewDragHelper 实现 QQ5.0 侧滑
项目地址:https://github.com/BlueMor/DragLayout
7、LDrawer
Material Design 形式的展开折叠 Icon
项目地址:https://github.com/ikimuhendis/LDrawer
四、ViewPager 、Gallery
1、AdvancedPagerSlidingTabStrip
一个完美兼容ViewPager的导航栏组件;可以自定义TabView;能动态加载Tab上的Icon图片; 能显示Tab的消息数量和提示小圆点;支持自定义为微博形式的可滑动tab。
2、ConvenientBanner
通用的广告栏控件,让你轻松实现广告头效果。支持无限循环,可以设置自动翻页和时间(而且非常智能,手指触碰则暂停翻页,离开自动开始翻页。你也可以设置在界面onPause的时候不进行自动翻页,onResume之后继续自动翻页),并且提供多种翻页特效。 对比其他广告栏控件,大多都需要对源码进行改动才能加载网络图片,或者帮你集成不是你所需要的图片缓存库。而这个库能让有代码洁癖的你欢喜,不需要对库源码进行修改你就可以使用任何你喜欢的网络图片库进行配合。 项目地址:https://github.com/saiwu-bigkoo/Android-ConvenientBanner
3、Android-ViewPagerIndicator
配合 ViewPager 使用的 Indicator,支持各种位置和样式
项目地址:https://github.com/JakeWharton/Android-ViewPagerIndicator
Demo 地址:https://play.google.com/store/apps/details?id=com.viewpagerindicator.sample
APP 示例:太多了。。
五、TimeView
1、DateTimePicker
日期选择部件(Google Agenda 的样式风格)
项目地址:https://github.com/flavienlaurent/datetimepicker
Demo 地址:https://raw.github.com/biboune/datetimepicker/master/datetimepicker-sample.apk
效果图:
2、PickerView
仿 iOS 的 PickerView 控件,有时间选择和选项选择并支持一二三级联动效果,TimePopupWindow 时间选择器,支持年月日时分,年月日,时分等格式;OptionsPopupWindow 选项选择器,支持一,二,三级选项选择,并且可以设置是否联动
项目地址:https://github.com/saiwu-bigkoo/Android-PickerView
六、GraphView
1、MPAndroidChart
强大的图表绘制工具,支持折线图、面积图、散点图、时间图、柱状图、条图、饼图、气泡图、圆环图、范围(高至低)条形图、网状图等;支持图的拖拽缩放;支持 Android 2.2 以上,支持横纵轴缩放,多指缩放,展现动画、高亮、保存到 sdcard、从文件读取图表
项目地址:https://github.com/PhilJay/MPAndroidChart
Demo 地址:https://play.google.com/store/apps/details?id=com.xxmassdeveloper.mpchartexample
Demo 项目:https://github.com/PhilJay/MPAndroidChart/tree/master/MPChartExample
效果图:
2、achartengine
强大的图表绘制工具,支持折线图、面积图、散点图、时间图、柱状图、条图、饼图、气泡图、圆环图、范围(高至低)条形图、拨号图/表、立方线图及各种图的结合
项目地址:https://code.google.com/p/achartengine/
http://www.achartengine.org/dimages/sales_line_and_area_chart.png
http://www.achartengine.org/dimages/temperature_range_chart.png
http://www.achartengine.org/dimages/combined_chart.png
http://www.achartengine.org/dimages/budget_chart.png
官网网址:http://www.achartengine.org/
APP 示例:Wordpress Android,Google Analytics
3、GraphView
绘制图表和曲线图的 View,可用于 Android 上的曲形图、柱状图、波浪图展示
项目地址:https://github.com/jjoe64/GraphView
Demo 项目:https://github.com/jjoe64/GraphView-Demos
APP 示例:Wordpress Android,Google Analytics
4、XCL-Charts
XCL-Charts 基于原生的 Canvas 来绘制各种图表,在设计时,尽量在保证开发效率的同时,给使用者提供足够多的定制化能力。因此使用简便,同时具有相当灵活的定制能力。目前支持 3D/非 3D 柱形图(Bar Chart)、3D/非 3D 饼图(Pie Chart)、堆积图(Stacked Bar Chart)、面积图(Area Chart)、 折线图(Line Chart)、曲线图(Spline Chart)、环形图(Dount Chart)、南丁格尔玫瑰图(Rose Chart)、仪表盘(Dial Chart)、刻度盘(Gauge Chart)、雷达图(Radar Chart)、圆形图(Circle Chart)等图表。其它特性还包括支持图表缩放、手势移动、动画显示效果、高密度柱形显示、图表分界定制线、多图表的混合显示及同数据源不同类型图表切换等。
项目地址:https://github.com/xcltapestry/XCL-Charts
Demo 地址:https://github.com/xcltapestry/XCL-Charts/blob/master/XCL-Charts-demo/bin/XCL-Charts-demo.apk?raw=true
5、HelloCharts for Android
支持折线图、柱状图、饼图、气泡图、组合图;支持预览、放大缩小,滚动,部分图表支持动画;支持 Android 2.2 以上
项目地址:https://github.com/lecho/hellocharts-android
Demo 地址:https://play.google.com/store/apps/details?id=lecho.lib.hellocharts.samples
在线演示:https://www.youtube.com/watch?v=xbSBjyjH2SY
第二部分 工具库
主要包括那些不错的开发库,包括依赖注入框架、图片缓存、网络请求、数据库 ORM 建模、Android 公共库、Android 高版本向低版本兼容、多媒体相关及其他。
一、依赖注入 DI
通过依赖注入减少 View、服务、资源简化初始化,事件绑定等重复繁琐工作
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,在编译时完成,不会对运行时有性能影响。
其他:与 roboguice 的比较:roboguice 通过运行时读取 annotations 进行反射,所以可能影响应用性能,而 AndroidAnnotations 在编译时生成子类,所以对性能没有影响
roboguice
帮你处理了很多代码异常,利用 annotation 使得更少的代码完成项目
项目地址:https://github.com/roboguice/roboguice
文档介绍:https://github.com/roboguice/roboguice/wiki
butterknife
利用 annotation 帮你快速完成 View 的初始化,减少代码
项目地址:https://github.com/JakeWharton/butterknife
文档介绍:http://jakewharton.github.io/butterknife/
Dagger
依赖注入,适用于 Android 和 Java
项目地址:https://github.com/square/dagger
原理剖析文档:Dagger
文档介绍:http://square.github.io/dagger/
AutoParcel
注解自动生成Parcelable实现代码的库
项目地址:https://github.com/frankiesardo/auto-parcel
这篇文章详细介绍了它的使用方法:AutoParcel
作者认为使用AutoParcel的好处是,可以简化构造函数,方便IDE代码自动完成,方便测试,前向兼容,生成不可变的对象。
文档介绍:https://github.com/frankiesardo/auto-parcel
二、图片缓存
1、Android-Universal-Image-Loader
图片缓存,目前使用最广泛的图片缓存,支持主流图片缓存的绝大多数特性。
项目地址:https://github.com/nostra13/Android-Universal-Image-Loader
原理剖析文档: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、Cube ImageLoader
阿里巴巴一淘使用的图片加载,综合了 Android-Universal-Image-Loader 和 square 等组件优点,简单易用,良好的中文文档支持
项目地址:https://github.com/etao-open-source/cube-sdk
Demo 地址:https://github.com/liaohuqiu/cube-sdk/raw/master/cube-sdk-sample.apk
文档介绍:http://cube-sdk.liaohuqiu.net/
效果图:
4、fresco
一款强大的图片缓存工具,由 Facebook 开发
项目地址:https://github.com/facebook/fresco
文档介绍:http://frescolib.org/
特点:(1) 两个内存缓存加上磁盘缓存构成了三级缓存
(2) 支持流式,可以类似网页上模糊渐进式显示图片
(3) 对多帧动画图片支持更好,如 Gif、WebP
(4) 更多样的显示,如圆角、进度条、点击重试、自定义对焦点
(5) 更多样的加载,如支持 EXIF、全面支持 WebP
(6) 支持 Android 2.3+
5、Glide
Glide 是一个 android 平台上的快速和高效的开源的多媒体资源管理库,提供 多媒体文件的压缩,内存和磁盘缓存, 资源池的接口。
它可以最大性能地在 Android 设备上读取、解码、显示图片和视频。Glide 可以将远程的图片、视频、动画图片等缓存在设备本地便于提高用户浏览图片的流畅体验。
项目地址:https://github.com/bumptech/glide
特点:
(1) GIF 动画的解码
(2) 本地视频剧照的解码
(3) 支持缩略图
(4) Activity 生命周期的集成
(5) 转码的支持
(6) 动画的支持
(7) OkHttp 和 Volley 的支持
三、网络请求
1、Volley
Google 提供的网络通信库,使得网络请求更简单、更快速
项目地址:https://android.googlesource.com/platform/frameworks/volley
文档介绍:http://commondatastorage.googleapis.com/io-2013/presentations/110%20-%20Volley-%20Easy,%20Fast%20Networking%20for%20Android.pdf
2、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
3、android-query
异步加载,更少代码完成 Android 加载
项目地址:https://github.com/androidquery/androidquery 或 https://code.google.com/p/android-query/
Demo 地址:https://play.google.com/store/apps/details?id=com.androidquery
文档介绍:https://code.google.com/p/android-query/#Why_AQuery?
特点:https://code.google.com/p/android-query/#Why_AQuery?
4、Async Http Client
Java 异步 Http 请求
项目地址:https://github.com/AsyncHttpClient/async-http-client
文档介绍:http://sonatype.github.io/async-http-client/
5、Ion
支持图片、json、http post 等异步请求
项目地址:https://github.com/koush/ion
文档介绍:https://github.com/koush/ion#more-examples
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/
9、RoboSpice
Android 异步网络请求工具,支持缓存、REST 等等
项目地址:https://github.com/stephanenicolas/robospice
Demo 地址:https://github.com/stephanenicolas/RoboDemo/downloads
10、TwistVolley
TwistVolley 是对 Volley 的一个封装库。提供类似 Picasso 一样的串联式 API。使得使用 Volley 更加方便。
项目地址:https://github.com/TwistedEquations/TwistVolley
四、数据库 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、GreenDaoUpgradeHelper
greenDAO的数据库升级帮助类,只需一行代码解决数据库升级
项目地址:https://github.com/yuweiguocn/GreenDaoUpgradeHelper
3、ActiveAndroid
Android Sqlite orm 的 db 工具类
项目地址:https://github.com/pardom/ActiveAndroid
文档介绍:https://github.com/pardom/ActiveAndroid/wiki/_pages
4、Sprinkles
Android Sqlite orm 的 db 工具类,比较显著的特点就是配合 https://github.com/square/retrofit 能保存从服务器获取的数据
项目地址:https://github.com/emilsjolander/sprinkles
文档介绍:http://emilsjolander.github.io/blog/2013/12/18/android-with-sprinkles/
5、Realm
移动端的数据库,适用于 Phone、Tablet、Wearable,支持 ORM,线程安全、支持连表及数据库加密,比 SQLite 性能更好
项目地址:https://github.com/realm/realm-java
文档介绍:http://realm.io/docs/java/0.72.0/
6、ormlite-android
项目地址:https://github.com/j256/ormlite-android
文档介绍:http://ormlite.com/sqlite_java_android_orm.shtml
7、Schematic
根据 SQLite 生成 ContentProvider
项目地址:https://github.com/SimonVT/schematic
8、DBFlow
Android SQLite ORM 工具库。综合了 Active Android, Schematic, Ollie,Sprinkles 等库的优点;通过注解实现,性能好;能生成 ContentProvider。
项目地址:https://github.com/Raizlabs/DBFlow
文档介绍:https://github.com/Raizlabs/DBFlow#usage-docs
SnappyDB SnappyDB是一个key-value数据库,非常流行的NoSQL数据库。 项目地址:https://github.com/nhachicha/SnappyDB 演示Demo:https://play.google.com/store/apps/details?id=com.snappydb.snippets.app 性能对比图:
五、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/android/android-common-lib/
包括:a. ImageCache 图片缓存,包含内存和 Sdcard 缓存
http://www.trinea.cn/android/android-imagecache/
特点:(1)支持预取新图片,支持等待队列
(2)包含二级缓存,可自定义文件名保存规则
(3)可选择多种缓存算法(FIFO、LIFO、LRU、MRU、LFU、MFU 等 13 种)或自定义缓存算法
(4)可方便的保存及初始化恢复数据
(5)支持不同类型网络处理
(6)可根据系统配置初始化缓存等
3、HttpCache Http 缓存
文档介绍:http://www.trinea.cn/android/android-http-cache
特点是:(1) 根据 cache-control、expires 缓存 http 请求
(2) 支持同步、异步 Http 请求
(3) 在匿名回调中处理请求结果
(4) 在 UI 线程外进行 http 请求
(5) 默认 gzip 压缩
(2) 公共 View(下拉及底部加载更多 ListView、底部加载更多 ScrollView、滑动一页 Gallery)
(3) Android 常用工具类(网络、下载、Android 资源操作、shell、文件、Json、随机数、Collection 等等)
4、DropDownListView 下拉刷新及滑动到底部加载更多 ListView
文档介绍:http://www.trinea.cn/android/dropdown-to-refresh-and-bottom-load-more-listview/
5、shipfaster
整合了 Dagger Otto Retrofit Robolectric Picasso OkHttp,方便快速开发
项目地址:https://github.com/pyricau/shipfaster
6、CleanAndroidCode
整合了 Dagger Otto AndroidAnnotations,方便快速开发
项目地址:https://github.com/pyricau/CleanAndroidCode
7、xUtils
基于 Afinal,包含 DbUtils、ViewUtils、HttpUtils、BitmapUtils 四大模块,可用于快速开发
项目地址:https://github.com/wyouflf/xUtils
原理剖析文档:xUtils
8、Afinal
Afinal 是一个 android 的 ioc,orm 框架,内置了四大模块功能:FinalAcitivity,FinalBitmap,FinalDb,FinalHttp。通过 finalActivity,我们可以通过注解的方式进行绑定 ui 和事件。通过 finalBitmap,我们可以方便的加载 bitmap 图片,而无需考虑 oom 等问题。通过 finalDB 模块,我们一行代码就可以对 android 的 sqlite 数据库进行增删改查。通过 FinalHttp 模块,我们可以以 ajax 形式请求 http 数据
项目地址:https://github.com/yangfuhai/afinal
官网网址:http://www.afinal.org
之后的有时间在继续更新啊!
如需转载请标明出处:
1>https://github.com/Trinea/android-open-project
2>http://blog.****.net/wlytctw/article/details/51223228