- 一、Dialog
- 二、EventBus3.0
- 三、組件View
- 四、Zxing二維碼
- 五、拍照界面
- 六、自定義view
- 七、RecyclerView
- 八、ViewPager封裝
- 九、Utils
- 十、網絡請求
- 十一、網絡解析
- 十二、圖片選擇庫
- 十三、佈局
- 1. 百分比佈局
- 十四、Litepal 數據庫
- 十五、文件下載
- 十六、手勢解鎖PatternLockView
- 十七、動態權限
- 十八、ButterKnife註解
- 十九、下拉刷新庫
- 二十、動畫
- 二十一、NewbieGuide引導蒙版
- 二十二、LoadSir 加載狀態佈局
- 二十三、StatusBarUtil 狀態欄工具類(實現沉浸式狀態欄/變色狀態欄)
//所有庫
https://github.com/XXApple/AndroidLibs
一、Dialog
1. ColorDialog & PromptDialog
https://github.com/andyxialm/ColorDialog
project:
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
module(已添加至UtilsLib):
dependencies {
compile 'com.github.andyxialm:ColorDialog:1.0.0'
}
2. material-dialogs 替代AlertDialog
https://github.com/afollestad/material-dialogs
module
compile 'com.afollestad.material-dialogs:commons:0.9.4.5'
3. MNProgressHUD
//Toast
//有很多其他庫
https://github.com/maning0303/MNProgressHUD
4. ProgressDialog類
https://github.com/leandroBorgesFerreira/LoadingButtonAndroid
5. XProgressDialog
https://github.com/pengwei1024/XProgressDialog
6. Dynamicbox 加載數據,沒有網絡等emptyView (推薦)
https://github.com/medyo/Dynamicbox
使用方法:
DynamicBox box = new DynamicBox(this, view); //需要觸發的組件
box.show...
box.hideAll();
二、EventBus3.0
https://github.com/greenrobot/EventBus
http://blog.csdn.net/itachi85/article/details/52205464
compile 'org.greenrobot:eventbus:3.0.0'
or
<dependency>
<groupId>org.greenrobot</groupId>
<artifactId>eventbus</artifactId>
<version>3.0.0</version>
</dependency>
三、組件View
1. AutoFitTextView 動態改變字體大小
https://github.com/grantland/android-autofittextview
http://blog.csdn.net/qq_23547831/article/details/50592352
2. EditText內容判斷註解
https://github.com/ragunathjawahar/android-saripaar
http://www.jianshu.com/p/e4a5fa7edcde
allprojects {
repositories {
...
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
}
compile 'com.mobsandgeeks:android-saripaar:2.0.3'
3. FlowLayout 子控件自動換行的佈局
https://github.com/nex3z/FlowLayout
compile 'com.nex3z:flow-layout:1.0.0'
4. GifView 顯示gif圖的組件
project:
repositories {
maven {
url "https://jitpack.io"
}
}
module依賴:
compile 'com.github.Cutta:GifView:1.1'
使用:
<com.cunoraz.gifview.library.GifView
android:id="@+id/gv"
app:gif="@mipmap/qq"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
5. PowerfulViewLibrary(含可展開LinearLayout)
https://github.com/chaychan/PowerfulViewLibrary
http://blog.csdn.net/Chay_Chan/article/details/72810770
Project:
maven { url 'https://jitpack.io' }
module:
compile 'com.github.chaychan:PowerfulViewLibrary:1.2.1'
6. FloatingActionButton
https://github.com/makovkastar/FloatingActionButton
compile 'com.melnykov:floatingactionbutton:1.3.0'
四、Zxing二維碼
1. 集成二維碼掃描庫zxing
http://blog.csdn.net/qq_23547831/article/details/52037710
https://github.com/yipianfengye/android-zxingLibrary
權限:
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.CAMERA" />
module依賴
compile 'cn.yipianfengye.android:zxing-library:2.1'
2. zxing-android-embedded
https://github.com/journeyapps/zxing-android-embedded
http://blog.csdn.net/sankoshine/article/details/50823238?skin=ink
compile 'com.google.zxing:core:3.3.0'
compile 'com.journeyapps:zxing-android-embedded:3.3.0'
五、拍照界面
1. CameraFragment
https://github.com/florent37/CameraFragment
compile 'com.github.florent37:camerafragment:1.0.7'
六、自定義view
1. 幾種自定義view
https://github.com/lygttpod/AndroidCustomView
2. 多邊形繪製
https://github.com/stkent/PolygonDrawingUtil
七、RecyclerView
1. Adapter封裝 BaseRecyclerViewAdapterHelper
compile 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.33'
maven { url "https://jitpack.io" }
https://github.com/CymChad/BaseRecyclerViewAdapterHelper
使用方式:
http://www.recyclerview.org/
http://www.jianshu.com/p/b343fcff51b0
2. 自動吸附邊緣的MultiSnapRecyclerView
https://github.com/TakuSemba/MultiSnapRecyclerView
compile 'com.github.takusemba:multisnaprecyclerview:1.1.0'
app:msrv_gravity="start" //吸附對齊位置 center end
app:msrv_snap_count="5" //將所有item分爲5部分 不設置則爲1
八、ViewPager封裝
1. Banner
- 自動輪播
- Glide加載圖片
- 有指示器
- 有title
module依賴:
compile 'com.youth.banner:banner:1.4.9'
https://github.com/youth5201314/banner
2. RollViewPager
https://github.com/Jude95/RollViewPager
http://blog.csdn.net/double2hao/article/details/51328824
compile 'com.jude:rollviewpager:1.4.6'
九、Utils
1. AndroidUtilCode
https://github.com/Blankj/AndroidUtilCode
compile 'com.blankj:utilcode:1.9.8'
十、網絡請求
1. Volley封裝
https://github.com/mBigFlower/volley-utils
compile 'com.flowerfat.volleyutil:volleyutil:0.3.4' //volley封裝 --> https://github.com/mBigFlower/volley-utils
使用:
在Application中初始化:
VolleyUtils.getInstance().init(this, true); //表示是否session保持
2. OkHttp原生
https://github.com/square/okhttp
compile 'com.squareup.okhttp3:okhttp:3.9.1'
3. OkHttpFinal
https://github.com/pengjianbo/OkHttpFinal
compile 'cn.finalteam:okhttpfinal:2.0.7'
4. okhttp-OkGo
https://github.com/jeasonlzy/okhttp-OkGo
http://blog.csdn.net/bskfnvjtlyzmv867/article/details/71598263
//必須使用
compile 'com.lzy.net:okgo:3.0.4'
//以下三個選擇添加,okrx和okrx2不能同時使用
compile 'com.lzy.net:okrx:1.0.2'
compile 'com.lzy.net:okrx2:2.0.2'
compile 'com.lzy.net:okserver:2.0.5'
5. Retrofit 原生
https://github.com/square/retrofit
http://www.jianshu.com/p/308f3c54abdd
https://github.com/square/retrofit
十一、網絡解析
1. 容錯IKGson
https://github.com/1004145468/IKGson
十二、圖片選擇庫
1. Matisse
https://github.com/zhihu/Matisse
2. boxing[MVP模式]
https://github.com/Bilibili/boxing
十三、佈局
1. 百分比佈局
https://github.com/hongyangAndroid/android-percent-support-extend
http://blog.csdn.net/lmj623565791/article/details/46767825
compile 'com.zhy:percent-support-extends:1.0.7'
2. 滑動返回佈局SwipeBackLayout
https://github.com/ikew0ng/SwipeBackLayout
compile 'me.imid.swipebacklayout.lib:library:1.0.0'
十四、Litepal 數據庫
https://github.com/LitePalFramework/LitePal
compile 'org.litepal.android:core:1.5.1'
十五、文件下載
1. FileDownloader
https://github.com/wlfcolin/file-downloader
http://www.cnblogs.com/wlfcolin/p/5001363.html
compile 'org.wlf:FileDownloader:0.3.2'
2. FileDownloaderFinal(封裝FileDownloader)
https://github.com/pengjianbo/FileDownloaderFinal
compile 'cn.finalteam:filedownloaderfinal:1.0.7'
3. Aria(推薦)
https://github.com/AriaLyy/Aria
https://www.jianshu.com/p/ba32dc499db3
compile 'com.arialyy.aria:aria-core:3.3.7'
annotationProcessor 'com.arialyy.aria:aria-compiler:3.3.7'
十六、手勢解鎖PatternLockView
https://github.com/aritraroy/PatternLockView
十七、動態權限
1. MPermissions動態權限
http://blog.csdn.net/lmj623565791/article/details/50709663?locationNum=1&fps=1
2. EasyPermissions 動態權限
https://github.com/googlesamples/easypermissions
詳細使用:http://www.jianshu.com/p/2b3661928e66
compile 'pub.devrel:easypermissions:0.4.2'
十八、ButterKnife註解
https://github.com/JakeWharton/butterknife
http://www.apkbus.com/blog-904057-67981.html
project
classpath 'com.jakewharton:butterknife-gradle-plugin:8.6.0'
module
compile 'com.jakewharton:butterknife:8.6.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.6.0'
十九、下拉刷新庫
1. SmartRefreshLayout 下拉刷新
https://github.com/scwang90/SmartRefreshLayout
https://segmentfault.com/a/1190000010066071
compile 'com.scwang.smartrefresh:SmartRefreshLayout:1.0.3'
compile 'com.scwang.smartrefresh:SmartRefreshHeader:1.0.3'//沒有使用特殊Header,可以不加這行
2. SpringView
https://github.com/liaoinstan/SpringView
http://blog.csdn.net/liaoinstan/article/details/51023907
compile 'com.liaoinstan.springview:library:1.2.6'
3. CustomRefreshView
https://github.com/zhangtuodd/CustomRefreshView
http://www.jianshu.com/p/1a82cdab2249
compile 'com.zt.maven.widget:refreshview:1.0.0'
二十、動畫
1. Spruce Android Animation Library
https://github.com/willowtreeapps/spruce-android
二十一、NewbieGuide引導蒙版
https://github.com/huburt-Hu/NewbieGuide/blob/master/doc/README-zh.md
Project:
repositories {
maven { url 'https://jitpack.io' }
}
Module:
compile 'com.github.huburt-Hu:NewbieGuide:v1.2.0'
二十二、LoadSir 加載狀態佈局
https://github.com/KingJA/LoadSir
http://www.jianshu.com/p/2d3537101281
compile 'com.kingja.loadsir:loadsir:1.3.2'
二十三、StatusBarUtil 狀態欄工具類(實現沉浸式狀態欄/變色狀態欄)
https://jaeger.itscoder.com/android/2016/03/27/statusbar-util.html
https://github.com/laobie/StatusBarUtil
compile 'com.jaeger.statusbarutil:library:1.4.0'