Android教程網
  1. 首頁
  2. Android 技術
  3. Android 手機
  4. Android 系統教程
  5. Android 游戲
 Android教程網 >> Android技術 >> 關於Android編程 >> Android開源項目- 匯總

Android開源項目- 匯總

編輯:關於Android編程

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

這裡寫圖片描述
效果圖:
/uploadfile/2016/0423/20160423092144205.gif
/uploadfile/2016/0423/20160423092145107.gif
/uploadfile/2016/0423/20160423092145758.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
這裡寫圖片描述
效果圖<喎?/kf/ware/vc/" target="_blank" class="keylink">vcD4NCjxwPjEyoaJQaW5uZWRIZWFkZXJMaXN0VmlldzxiciAvPg0KR3JvdXBOYW1lu6yE07W97ZS2y5Vylf65zLaosruE09axtb3B7c3i0ruCgEdyb3VwTmFtZbW931/tlLbLtcRFeHBhbmRMaXN0VmlldzxiciAvPg0K7ZfEv7XY1rejujxhIGhyZWY9"https://github.com/JimiSmith/PinnedHeaderListView">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
效果展示:/uploadfile/2016/0423/20160423092146847.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
效果圖展示:/uploadfile/2016/0423/20160423092146365.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
效果圖:/uploadfile/2016/0423/20160423092146217.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/
這裡寫圖片描述
/uploadfile/2016/0423/20160423092146219.png
/uploadfile/2016/0423/20160423092152177.png
/uploadfile/2016/0423/20160423092153146.png
/uploadfile/2016/0423/20160423092154699.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. 上一頁:
  2. 下一頁:
熱門文章
閱讀排行版
Copyright © Android教程網 All Rights Reserved