1. 程式人生 > >android-------- 常用且應該學習的框架

android-------- 常用且應該學習的框架

5. glide

一句話介紹:glide是一款專注於提供流暢划動能力的“圖片載入和快取框架”

上榜理由:15.9k個star,圖片載入類框架排名第一的框架,google 在2014開發者大會上演示的camera app就是基於gilde框架開發的

github https://github.com/bumptech/glide

作者 Bump Technologies團隊

使用:

複製程式碼複製程式碼
repositories {
  mavenCentral()
}

dependencies {
    compile 'com.github.bumptech.glide:glide:3.8.0'
    compile 'com.android.support:support-v4:19.1.0'
}
複製程式碼複製程式碼

6.leakcanary

一句話介紹:一款記憶體檢測框架,服務於java和android客戶端

上榜理由:方便,簡潔是leakcanary最大的特點,只需在應用的apllication中整合,就可以直接使用它;15.5k個star說明了它有多麼受歡迎

github https://github.com/square/leakcanary

作者 square團隊

使用:

 dependencies {
   debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5.1'
   releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
   testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
 }

在 Application 中寫入:

複製程式碼複製程式碼
public class ExampleApplication extends Application {

  @Override public void onCreate() {
    super.onCreate();
    if (LeakCanary.isInAnalyzerProcess(this)) {
      // This process is dedicated to LeakCanary for heap analysis.
      // You should not init your app in this process.
      return;
    }
    LeakCanary.install(this);
    // Normal app init code...
  }
}
複製程式碼複製程式碼

7.Android-Universal-Image-Loader

一句話介紹:曾經的圖片載入框架王者,android開發老手都用過它

上榜理由:android端圖片載入框架的老大哥了,15.3k個star足以證明它的熱門,UIL與gilde最大區別是可定製,UIL提供了大量配置方式,圖片載入狀態的回撥(成功,失敗,進行中),載入動畫等;以及提供了移動端圖片載入框架的快取思路:三級快取策略 sd卡-記憶體-網路;值得注意的是,UIL以及兩年未更新了,但筆者仍推薦各位使用!

github https://github.com/nostra13/Android-Universal-Image-Loader

作者 nostra13

使用:

下載地址  universal-image-loader-1.9.5.jar

8.EventBus 

一句話介紹:EventBus是一款本地元件間通訊框架

上榜理由:元件間通訊框架star量第一:14.8k,在大型專案的Activities,fragments,Threads,Services都可以看到它的使用場景,儘管EventBus在向未建立的元件傳遞事件時有些侷限,僅適合在“活著的”元件間傳遞訊息,但仍不妨礙它活躍在各個大型專案各個場景裡。

官網地址 http://greenrobot.org/eventbus/documentation/how-to-get-started/

github  https://github.com/greenrobot/EventBus

作者 greenrobot 

使用:

compile 'org.greenrobot:eventbus:3.0.0'

9.zxing

一句話介紹:條碼影象處理庫

上榜理由:如果你用過二維碼,你肯定已經間接使用過大名鼎鼎的zxing了。13.9K的star量,讓它排在本榜單第九,實至名歸,如果你有了解二維碼的需求,不妨從瞭解、修改它原始碼入手。

github  https://github.com/zxing/zxing

作者  Sean Owen

10.picasso

一句話介紹:強力的圖片下載、快取框架

上榜理由:本榜單出現的第三款圖片類框架,不同的是picasso更強調圖片下載,你可以將picasso整合進你的專案中,你也可以結合gilde和UIL與picasso,三者一齊封裝至你的專案中,按需所用。

官網地址 http://square.github.io/picasso/

github  https://github.com/square/picasso

作者 square團隊

使用:

compile 'com.squareup.picasso:picasso:2.5.2'

或者下載

jar包

11.lottie-android

一句話介紹:一款可以在Android端快速展示Adobe Afeter Effect(AE)工具所作動畫的框架

上榜理由:動畫類框架第一名,github上13.3k個star證明了他的優越性,利用json檔案快速實現動畫效果是它最大的便利,而這個json檔案也是由Adobe提供的After Effects(AE)工具製作的,在AE中裝一個Bodymovin的外掛,使用這個外掛最終將動畫效果生成json檔案,這個json檔案即可由LottieAnimationView解析並生成絢麗的動畫效果。而且它還支援跨平臺喲。

github  https://github.com/airbnb/lottie-android

作者:Airbnb 團隊

12.fresco

一句話介紹:一款可以管理圖片記憶體的框架

上榜理由:github上12.8k個star,圖片類排行榜第四名,facebook的出身證明了它並非是重複造的輪子,在管理圖片記憶體領域上有著它的一片天地,漸進式載入、載入gif都是它與前三位相比獨有的特性

官網地址: https://www.fresco-cn.org/

github  https://github.com/facebook/fresco

作者 facebook

使用:

dependencies {
  // 其他依賴
  compile 'com.facebook.fresco:fresco:0.12.0'
}

下面的依賴需要根據需求新增:

複製程式碼複製程式碼
dependencies {
  // 在 API < 14 上的機器支援 WebP 時,需要新增
  compile 'com.facebook.fresco:animated-base-support:0.12.0'

  // 支援 GIF 動圖,需要新增
  compile 'com.facebook.fresco:animated-gif:0.12.0'

  // 支援 WebP (靜態圖+動圖),需要新增
  compile 'com.facebook.fresco:animated-webp:0.12.0'
  compile 'com.facebook.fresco:webpsupport:0.12.0'

  // 僅支援 WebP 靜態圖,需要新增
  compile 'com.facebook.fresco:webpsupport:0.12.0'
}
複製程式碼複製程式碼

13.RxAndroid

一句話介紹:一款Android客戶端元件間非同步通訊的框架

上榜理由:github上12.7k個star,位居元件通訊框架的第二名,僅在EventBus之後,如果要問兩者的區別,Eventbus是用來取代元件間繁瑣的interface,RxAndroid是用來取代AnsyTask的,並不衝突;當然RxAndroid的優點並不僅限於此,更多優雅的實現,可以去官網查閱!

github  https://github.com/ReactiveX/RxAndroid

作者 JakeWharton

使用:

compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
compile 'io.reactivex.rxjava2:rxjava:2.1.0'

14.SlidingMenu

一句話介紹:側滑選單欄框架

上榜理由:與Userval-Image-loader 齊名的上古神器框架——為你的app提供側滑選單欄的功能;github閃更有10.5k個star,證明了它的經久不衰,即使在Google推出了NavigationDrawer,仍然沒有減少開發者對SildingMenu的擁簇,經典總是經得起考驗的,這個上古神獸已經四年沒有更新了;有太多太多的app使用過它,這些都可以在軟體的開源許可上看到!

github https://github.com/jfeinstein10/SlidingMenu

作者 Jeremy Feinstein

使用:

在gihub上fork原始碼,整合進專案中

15.PhotoView

一句話介紹:一款ImageView展示框架,支援縮放,響應手勢

上榜理由:10.3k的star數量,位於圖片類框架排行榜第五位,PhotoView與前四位不同的是這次帶來的是圖片的展示能力,你一定好奇微信的頭像點選放大是如何實現的,很多App的圖片顯示響應手勢按壓是如何實現的,瞭解PhotoView,你一定會開心的!(筆者也不會告訴你ImageView的點選放大效果在Android的sample也有)

github  https://github.com/chrisbanes/PhotoView

作者:chrisbanes

使用:

複製程式碼複製程式碼
在app根目錄的build.gradle中加入:
allprojects {
    repositories {
        maven { url "https://jitpack.io" }
    }
}
在app的module目錄的build.gralde中加入:

dependencies {
    compile 'com.github.chrisbanes:PhotoView:latest.release.here'
}
複製程式碼複製程式碼

使用

複製程式碼複製程式碼
<com.github.chrisbanes.photoview.PhotoView
    android:id="@+id/photo_view"
    android:layout_width="match_parent"
    android:layout_height="match_parent"/>

PhotoView photoView = (PhotoView) findViewById(R.id.photo_view); photoView.setImageResource(R.drawable.image);
複製程式碼複製程式碼

16.material-dialogs

一句話介紹:一款自定義dialog框架

上榜理由:9.9k個star,也是繼PhotoView,SlidingMenu之後第三款自定義View框架,也許你還是自定義View的新人,對Dialog使用的還有點生疏,你可以通過它提升你的Dilaog使用能力

github  https://github.com/afollestad/material-dialogs

作者:Aidan Follestad

使用:

dependencies {
    // ... other dependencies here
    compile 'com.afollestad.material-dialogs:core:0.9.4.5'
}

17.droid-async-http

 一句話介紹:一款基於Http協議的非同步請求的網路框架,

上榜理由:雖然你有無數個使用retrofit+okhttp的理由,但9.8k個star,證明它仍然值得你深入學習。值得注意的是,它也已經有兩年沒更新了,你儘管拿去當你懶惰的理由!

github   https://github.com/loopj/android-async-http

作者:James Smith

使用:

複製程式碼複製程式碼
repositories {
  maven {
    url 'https://oss.sonatype.org/content/repositories/snapshots/'
  }
}
dependencies {
  compile 'com.loopj.android:android-async-http:1.5.0-SNAPSHOT'
}
複製程式碼複製程式碼

18.androidannotations

一句話介紹:一款基於註解的快速開發框架

上榜理由:與Butterknife一樣基於註解,利用註解快速完成view的初始化,不同的是androidannotations提供了更多的能力:簡單的執行緒模型等;筆者只接觸過Butterknife,無法更進一步敘述androidannotations的優勢,如果你志在深入瞭解註解的妙用,可以嘗試探索一下!

官網地址 http://androidannotations.org/

github https://github.com/androidannotations/androidannotations

作者: WonderCsabo

19.fastjson

一句話介紹:一款基於json解析、生成的框架

上榜理由:從它的名字不難看出,快速是它最大的特性,阿里巴巴的出身保證了程式碼的質量和優越,9.4k的star數量,也是榜單裡第一個出現的中國開源框架,涉及網路的app都會用到json,fastjson值得作為你的首選!

github  https://github.com/alibaba/fastjson

作者:alibaba

使用:

compile 'com.alibaba:fastjson:1.1.58.android'

20.Material-Animations

一句話介紹:一款提供場景轉換過渡能力的動畫框架

上榜理由:Android動畫框架排行榜第二名,9.3k個star數量,與動畫框架榜單第一名lottie-android不同的是,Material-Animations提供的是場景切換的動畫效果。Android 官網sample中已經提供了部分Transition (轉場動畫)的展示,作為初學者很難快速拓展到自己專案中,Material-Animations的示例出現為開發者省去了此類麻煩,直接照搬應用到自己的App中吧。

 github  https://github.com/lgvalle/Material-Animations

作者:Luis G. Valle

使用:

down原始碼,修改學習

21.tinker

一句話介紹:它是微信官網的Android熱補丁解決方案

上榜理由:9.1k個star,微信在用的熱補丁方案,心動不如行動

官網地址  http://www.tinkerpatch.com/Docs/intro

github   https://github.com/Tencent/tinker

作者:Tencent

22.ViewPagerIndicator

一句話介紹:一款基於ViewPager的頁面指示器開源框架

上榜理由:上古神器,儘管已經五年未更新了,但你仍然可以在淘寶等app中看到它的使用場景,8.9K的star量讓它不慍不火的在矗立在榜單裡

官網地址 http://viewpagerindicator.com/

github  https://github.com/JakeWharton/ViewPagerIndicator

作者:JakeWharton 

使用:

 下載 地址 https://github.com/JakeWharton/Android-ViewPagerIndicator/zipball/master

23.Android-CleanArchitecture

一句話介紹:一個講解設計框架的demo

上榜理由:它不是框架,你可以把它當作一本書,它將教會你如何設計簡潔的架構,工程裡有一個sample app,配合圖文講解,你將對Android客戶端的架構有更深一層的認識。8.8k的star數量,證明了它是一本“好書”喲。

github  https://github.com/android10/Android-CleanArchitecture

作者:Fernando Cejas

24..Android-PullToRefresh

一句話介紹:一款為普通檢視提供重新整理UI的檢視框架

上榜理由:8.2K的star數量使它位居重新整理類UI框架榜首,強大的相容能力,該框架支援ListView,GrdiView,WebViewScrollView,ViewPager等眾多View增加重新整理的能力,如果你有增加上拉載入,下拉載入的需求,你應該考慮它了!

github https://github.com/chrisbanes/Android-PullToRefresh

作者:Chris Banes

使用:

github fork原始碼,整合到專案中

25.flexbox-layout

一句話介紹:一款彈性伸縮佈局

上榜理由:8.1k個star,前端H5開發者轉Android開發的福音,FlexboxLayout作為LinearLayoutRelativeLayout的替代者,值得各位一試,與其一同推出的還有ConstraintLayout。

github  https://github.com/google/flexbox-layout

作者:Google

使用:

dependencies {
    compile 'com.google.android:flexbox:0.3.0-alpha3'
}

26.AndroidSwipeLayout

一句話介紹:非常強大滑動式佈局

上榜理由:滑動刪除是國產app常見需求,商品詳情的上下滑動需求作為開發者的我們也經常遇到,AndroidSwipeLayout在github上擁有8K個star,證明它經受住了檢驗,各位值得一試

github https://github.com/daimajia/AndroidSwipeLayout

作者:daimajia

使用:

dependencies {
    compile 'com.android.support:recyclerview-v7:21.0.0'
    compile 'com.android.support:support-v4:20.+'
    compile "com.daimajia.swipelayout:library:[email protected]"
}

或下載 

AndroidSwipeLayout-v1.1.8.jar

27.realm-java

一句話介紹:Realm是一款移動端資料庫框架

上榜理由:核心資料引擎C++打造,比普通的Sqlite型資料庫快的多。筆者猜測正是如此,realm以7892個star數讓它位於大名鼎鼎的資料庫框架GreenDao(7877)之前

官網地址:https://realm.io/cn/

github https://github.com/realm/realm-java

作者:Realm團隊 

使用:https://realm.io/docs/java/latest/

28.greenDAO

一句話介紹:greenDAO是一款高效、快速的SQLite型資料庫

上榜理由:greenDAO的star數量與Realm不相上下,且與EventBus師出同門,也是由greenrobot團隊開發維護的,質量有所保證,但若拷問筆者Realm與greenDao兩者的優劣性,只能具體到實際使用當中,模擬線上的使用情形,進行高強度測試後才能下判斷,故在此不能一言兩語說完,深表遺憾

官網地址:http://greenrobot.org/greendao/

github  https://github.com/greenrobot/greenDAO

使用:

複製程式碼複製程式碼
buildscript {
    repositories {
        jcenter()
        mavenCentral() // add repository
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.1'
        classpath 'org.greenrobot:greendao-gradle-plugin:3.2.2' // add plugin
    }
}
 
-----
apply plugin: 'com.android.application' apply plugin: 'org.greenrobot.greendao' // apply plugin dependencies { compile 'org.greenrobot:greendao:3.2.2' // add library }
複製程式碼複製程式碼

29.stetho

一句話介紹:一款提供在Chrome開發者工具上除錯Android app能力的開源框架

上榜理由:上古時期Android程式設計師要除錯本地資料庫,需要進入Android Device Monitor找到/data/data/com.xxx.xxx/databases裡面的db檔案,匯出到PC端,用PC的資料工具檢視,現在使用stetho省卻瞭如此的麻煩;如今的Android程式設計師如果想除錯網路請求響應過程中的報文段,需要在請求中加入Log語句,一個資訊一個資訊打印出來,相當繁瑣,現在請使用stetho,省卻諸如此類的麻煩把!7.8K個star數,廣大Android開發者除錯的福音,你值得擁有!

作者:FaceBook

官網地址: http://facebook.github.io/stetho/

github   https://github.com/facebook/stetho

使用:

compile 'com.facebook.stetho:stetho:1.5.0'

30.BaseRecyclerViewAdapterHelper

一句話介紹:強大、流暢的Recyvlerview通用介面卡

上榜理由:如果你是RecyclerView的擁簇者,你一定要體驗這款專門服務該view的介面卡,7.7K個star,讓這個傢伙位於github上Android 介面卡排行榜第一,還有很多驚喜等你去探尋!

官網地址:http://www.recyclerview.org/

作者:陳宇明以及他的小夥伴

使用:

複製程式碼複製程式碼
allprojects {
    repositories {
        ...
        maven { url "https://jitpack.io" }
    }
}


dependencies {
        compile 'com.github.CymChad:BaseRecyclerViewAdapterHelper:VERSION_CODE'
}
複製程式碼複製程式碼

31.AndroidViewAnimations

一句話介紹:一款提供可愛動畫集合的框架

上榜理由:正如作者所說,它囊括了開發需求過程中所有的動畫效果,整合進了這個簡潔可愛的動畫框架。7.6K的star數,證明了它在動畫框架領域的戰鬥力,讓它僅僅位列lottie-android和Material-Animations兩個動畫框架霸主之後,屈居第三名

github https://github.com/daimajia/AndroidViewAnimations

作者:daimajia

使用:

dependencies {
        compile 'com.android.support:support-compat:25.1.1'
        compile 'com.daimajia.easing:library:[email protected]'
        compile 'com.daimajia.androidanimations:library:[email protected]'
}

sample:

YoYo.with(Techniques.Tada)
    .duration(700)
    .repeat(5)
    .playOn(findViewById(R.id.edit_area));

32. MaterialDrawer

一句話介紹:強大的塑料風格的抽屜框架

上榜理由:7.6K的star數量,作者的持續更新狀態,如果你還在猶豫上手SlidingMenu遇到bug沒人管的困境,那麼你可以入手它作為你的抽屜佈局 

github  https://github.com/mikepenz/MaterialDrawer

作者:Mike Penz

使用:

compile('com.mikepenz:materialdrawer:[email protected]') {
    transitive = true
}
new DrawerBuilder().withActivity(this).build();

 33.Android-ObservableScrollView

一句話介紹:一款讓檢視滑動更具有視覺效果的滑動式框架

上榜理由:7.5K的star數量,證明了它曾經的價值,github上提供了12種滑動效果,你可以用它彌補其他框架的不足,提升你的App體驗!

github https://github.com/ksoichiro/Android-ObservableScrollView

作者:Soichiro Kashima

使用:

compile com.github.ksoichiro:android-observablescrollview

34.CircleImageView

一句話介紹:圓角ImageView

上榜理由:也許你已經聽說過無數種展示圓角圖片的方法,但如果你不嘗試嘗試CircleImageView,那麼你的知識庫會因為少了它黯然失色,有的時候完成需求是開發者優先考慮的,不同實現方法牽扯到的效能差異更值得讓人深思,如果你有心在圖片效能上有所涉獵,那麼CircleImageView絕對不會讓你敗興而歸。最後別忘了記得去看Romain Guy的建議喲。

github https://github.com/hdodenhof/CircleImageView

作者:Henning Dodenhof

使用:

dependencies {
    ...
    compile 'de.hdodenhof:circleimageview:2.1.0'
}
複製程式碼複製程式碼
<de.hdodenhof.circleimageview.CircleImageView
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/profile_image"
    android:layout_width="96dp"
    android:layout_height="96dp"
    android:src="@drawable/profile"
    app:civ_border_width="2dp"
    app:civ_border_color="#FF000000"/>
複製程式碼複製程式碼

35.logger

一句話介紹:一款讓log日誌優雅顯示的框架

上榜理由:logger作為除錯框架,並未給出很強大的能力,它最大的亮點是優雅的輸出log資訊,並且支援多種格式:執行緒、Json、Xml、List、Map等,如果你整日沉迷於汪洋大海般的log資訊不能自拔,logger就是你的指路明燈!6.6k個star讓他位列除錯框架第二名,屈居facebook的stetho之後

github https://github.com/orhanobut/logger

作者:Orhan Obut

使用:

compile 'com.orhanobut:logger:2.1.1'
複製程式碼
Logger.d(MAP);
Logger.d(SET);
Logger.d(LIST);
Logger.d(ARRAY);
Logger.json(JSON_CONTENT);
Logger.xml(XML_CONTENT);
複製程式碼

36.agera

一句話介紹:一款服務於Android平臺的響應式程式設計框架

上榜理由:google專門推出一套響應式程式設計框架服務於Android開發者,相比於之響應式程式設計框架榜首的 RxJava RxAndroid,它更輕量,兩者最大的不同點在於agera基於push event、pull data (VS Rx系列 push data)。

github https://github.com/google/agera

作者:Google

使用:

  compile 'com.google.android.agera:agera:1.3.0'

擴充套件能力

  compile 'com.google.android.agera:content:1.3.0'
  compile 'com.google.android.agera:database:1.3.0'
  compile 'com.google.android.agera:net:1.3.0'
  compile 'com.google.android.agera:rvadapter:1.3.0'
  compile 'com.google.android.agera:rvdatabinding:1.3.0'

37.BottmBar

一句話介紹:一款底部導航欄檢視框架

上榜理由:底部欄裡的王者框架,6.3K的star數量,證明了它的優秀,完全遵循材料設計規範,上手非常方便。如果說缺點,無法設定icon與titile的間距,無法自定義檢視的大小等,但這些都可以通過修改原始碼解決,筆者獻醜也修改了一套符合國內開發者的底部導航框架,即將開源。

github  https://github.com/roughike/BottomBar

作者:Iiro Krankka

使用:

compile 'com.roughike:bottom-bar:2.3.1'

38.Calligraphy

一句話介紹:一款自定義字型框架

上榜理由:如果你還在為一鍵修改App內所有字型樣式而煩惱,6.3K個star的Calligraphy就值得你擁有,它可以同時修改整個整個專案的Textview字型,也可以單獨 設定某個Textview的字型,還在等什麼,快來試試吧!

github  https://github.com/chrisjenx/Calligraphy

作者:Christopher Jenkins

使用:

dependencies {
    compile 'uk.co.chrisjenx:calligraphy:2.3.0'
}

39.AndroidSlidingUpPanel

一句話介紹:可拖動的滑動面板檢視框架

上榜理由:如果你的專案需要一個可拖拽的滑動式面板(展示某些詳情資訊,播放音樂,地圖資訊等),那麼推薦你使用它,6.3k個star,來自創業公司umano的作品,證明它是用心推出的傑作

github https://github.com/umano/AndroidSlidingUpPanel

作者:umano

使用:

複製程式碼複製程式碼
dependencies {
    repositories {
        mavenCentral()
    }
compile 'com.sothree.slidinguppanel:library:3.3.1' }
複製程式碼複製程式碼

40.AppIntro

一句話介紹:一款提供快速製作歡迎頁的框架

上榜理由:筆者從未把打算把歡迎頁框架納入排行榜當中,作為國內開發者,ViewPager開發App的歡迎頁已經是手到擒來的需求,為何一個開源的歡迎頁框架會在github上擁有6.3k個star?也許你會不屑一顧,是的,往往就在不屑一顧的瞬間,機遇就悄悄溜走了。

github https://github.com/apl-devs/AppIntro

作者:Paolo Rotolo

複製程式碼複製程式碼
    allprojects {
        repositories {
            ...
            maven { url 'https://jitpack.io' }
        }
    }

    dependencies {
            compile 'com.github.apl-devs:appintro:v4.2.0'
    }
複製程式碼複製程式碼

41.recyclerview-animators

一句話介紹:一款為Recyclerview提供擴充套件動畫能力的框架

上榜理由:有一句老話:如果有天你失去對新事物的興趣,那就說明你老了。recyclerview已經推出快三年了,還在用listview的人們,是否已經發掘自己漸漸變老;不要灰心,快為你的專案加入recyclerview-animators框架吧,為“自己”加入新鮮的血液和能量!(筆者備註:6.2K個star)

github  https://github.com/wasabeef/recyclerview-animators

作者;https://github.com/wasabeef

使用:

dependencies {
  // jCenter
  compile 'jp.wasabeef:recyclerview-animators:2.2.6'
}

42.dagger

一句話介紹:一款通過依賴注入降低程式間耦合的開發框架

上榜理由:github 上dagger1版本 有6.2k個star , dagger2版本有7.3k個;由square完成的dagger1版本,到如今google團隊接手的dagger2版本,強力開發團隊保證了程式碼在設計上的優越性;如果你想探究Android 領域的設計模式,這也是不錯的選擇。

官網地址:https://google.github.io/dagger/

github :https://github.com/google/dagger

作者:google

使用:

複製程式碼複製程式碼
dependencies {
  compile 'com.google.dagger:dagger:2.x'
  annotationProcessor 'com.google.dagger:dagger-compiler:2.x'
}
If you're using classes in dagger.android you'll also want to include:

compile 'com.google.dagger:dagger-android:2.x'
compile 'com.google.dagger:dagger-android-support:2.x' 
annotationProcessor 'com.google.dagger:dagger-android-processor:2.x'
複製程式碼複製程式碼

43.Android-Bootstarp

一句話介紹:一款提供在Android應用上實現Bootstrap(web框架)所作出效果的框架

上榜理由:榜單上第二款響應web技術的Android 端框架,還記得第一名是誰嗎——flexbox-layout,作為Android開發者,你有必要去了解Web技術了。5.9k個star,證明它不容小覷

github https://github.com/Bearded-Hen/Android-Bootstrap

作者:Bearded-Hen團隊

使用:

dependencies {
   compile 'com.beardedhen:androidbootstrap:{X.X.X}'
}

44.RxBinding

一句話介紹:一款提供UI元件事件響應能力的框架

上榜理由:如果你還未開始RxAndroid 之旅,RxBinding可以作為你的第一站,通過RXBinding,你將理解響應式程式設計的快樂,讓專案裡的事件流程更清晰。5.6K個star,RxAndroid作者親自操刀,快來試用吧!

github  https://github.com/JakeWharton/RxBinding

作者:JakeWharton

複製程式碼複製程式碼
Platform bindings:

compile 'com.jakewharton.rxbinding2:rxbinding:2.0.0'
'support-v4' library bindings:

compile 'com.jakewharton.rxbinding2:rxbinding-support-v4:2.0.0'
'appcompat-v7' library bindings:

compile 'com.jakewharton.rxbinding2:rxbinding-appcompat-v7:2.0.0'
'design' library bindings:

compile 'com.jakewharton.rxbinding2:rxbinding-design:2.0.0'
'recyclerview-v7' library bindings:

compile 'com.jakewharton.rxbinding2:rxbinding-recyclerview-v7:2.0.0'
'leanback-v17' library bindings:

compile 'com.jakewharton.rxbinding2:rxbinding-leanback-v17:2.0.0'
複製程式碼複製程式碼

45.ListViewAnimations

一句話介紹:一款為ListView提供動展示畫效果能力的框架

上榜理由:如果有一天我承認自己老了,我還會排排我的兄弟——ListView,證明我和它一起戰鬥過。ListViewAnimations的存在就是證明我們這些“老年人”仍有用武之地,也許你有說不出口的難處,無法體會到RecyclerView裡動畫的快樂,擁有ListViewAnimations,你一樣可以驕傲的說,我的孩子(每個item)也有自己的動效啦。(筆者備註 5.6K個star)

github  https://github.com/nhaarman/ListViewAnimations

作者:nhaarman

使用:

複製程式碼複製程式碼
repositories {
    mavenCentral()
}

dependencies {
    compile 'com.nhaarman.listviewanimations:lib-core:[email protected]'
    compile 'com.nhaarman.listviewanimations:lib-manipulation:[email protected]'
    compile 'com.nhaarman.listviewanimations:lib-core-slh:[email protected]'
}
複製程式碼複製程式碼

46.UItimateRecyclerView

一句話介紹:一款提供重新整理、載入更多、動畫特效等額外能力的RecyclerView框架

上榜理由:榜單上第三次出現RecyclerView的身影,足以證明RecyclerView的優異性,5.5K個star,框架裡所提供眾多的能力,如果你是個功利開發者,那麼此框架會為你節省很多學習時間,它可以完成多item式佈局的大多數需求,值得注意的是,這個專案也是在其他專案的思路上二次開發的。

github  https://github.com/cymcsg/UltimateRecyclerView

作者:MarshalChen

使用:

複製程式碼複製程式碼
repositories {
    jcenter()
    }
dependencies {
    ...
    compile 'com.marshalchen.ultimaterecyclerview:library:0.7.2'
}
複製程式碼複製程式碼

47.uCrop

一句話介紹:一款優雅的圖片裁剪框架

上榜理由:5.3K個star,圖片編輯模組單獨拎出來也是一款優雅的App。

github  https://github.com/Yalantis/uCrop

作者:Yalantis

使用:

複製程式碼複製程式碼
allprojects {
   repositories {
      jcenter()
      maven { url "https://jitpack.io" }
   }
}
compile 'com.github.yalantis:ucrop:2.2.1'
複製程式碼複製程式碼

48.RxJava-Android-Samples

一句話介紹:一款介紹RxJava使用場景的app

上榜理由:榜單出現的第一個“僅僅為告訴你如何使用另一個專案”的開源專案,它可以說是RxJava的用例,你想得到的想不到的RxJava用法這裡都有,這就是為什麼它以5.2k個star矗立在這份榜單裡的原因。遺憾自己沒有創作這麼一個受人追捧的demo?趕快動手寫個其他的“XX專案用例吧”

github  https://github.com/kaushikgopal/RxJava-Android-Samples

作者:kaushikgopal

使用:

clone到本地慢慢探索吧

49.AndroidAutoLayout

一句話介紹:一個提供適配能力的框架

上榜理由:5.2K個star,鴻洋老弟的作品,適合小專案的開發團隊,拿到設計MM的px畫素設計稿是不是很頭疼捏?這個框架一鍵式搞定你的問題,它有很多的不足,但在追求完美適配的路上,你值得探索和了解它!筆者並不推薦把它應用到已經成熟執行的專案中,畢竟市面上已經有太多的適配解決方案了,適配問題就像是個大雜燴,想炒一盤好菜,就得備好各種佐料(適配小方案),當你把各種小佐料用的爐火純青的時候,你離美食大廚就不遠了。

github https://github.com/hongyangAndroid/AndroidAutoLayout

作者:張鴻洋

使用:

dependencies {
    compile 'com.zhy:autolayout:1.4.5'
}

50.EffectiveAndroidUI

一句話介紹:一款講解高效展示UI的教學型App

上榜理由:程式設計新手很難對MVC MVP,MVVM等模式有深刻的理解,如果有一個示例型app,那對初學者會有很大裨益,筆者在遇到它時也是相見恨晚。4.8K個star,證明了它經受了廣大開發者的考驗與審視,其中Effective UI的程式設計思想更是與Android官方課程裡的Effective UI課程不謀而合,並且,此專案還包含了fragment、dagger、主題樣式、Butterknife等眾多小知識點,作為程式設計初學者的學習用例再適合不過了

github  https://github.com/pedrovgs/EffectiveAndroidUI

作者:Pedro Vicente 

使用:

clone專案到本地

51.Luban

一句話介紹:最接近微信的圖片壓縮框架

上榜理由:好的思路總是可以讓你大放異彩,Luban僅以圖片壓縮單一功能,俘獲了4.8K個star,證明了它在圖片壓縮上的造詣,它可能不是最優秀的,但它是讓你我最接近偉大的專案

github  https://github.com/Curzibn/Luban

作者:Curzibn

使用:

compile 'top.zibin:Luban:1.1.1'