Androd常用开源库
- Logger
Simple, pretty and powerful logger for android
标量的日志打印
https://github.com/orhanobut/logger
implementation 'com.orhanobut:logger:2.2.0'
- Android System Bar Tint
Apply background tinting to the Android system UI when using KitKat translucent modes.
在使用KitKat半透明模式时,将背景颜色应用到Android系统UI中。
https://github.com/jgilfelt/SystemBarTint
implementation 'com.readystatesoftware.systembartint:systembartint:1.0.3'
- Nine Old Androids
其功能和android.animation.*中的类的功能完全一致,使用方法完全一样,只要我们用nineoldandroids来编写动画,就可以在所有的Android系统上运行。比较常用的几个动画类是:ValueAnimator、ObjectAnimator和AnimatorSet,其中ObjectAnimator继承自ValueAnimator,AnimatorSet是动画集,可以定义一组动画。使用起来也是及其简单的,下面举几个小栗子。
https://blog.youkuaiyun.com/singwhatiwanna/article/details/17639987
https://github.com/JakeWharton/NineOldAndroids
compile 'com.nineoldandroids:library:2.4.0'
- LogUtils
支持直接打印数据集合,如List、Set、Map、数组等
全局配置log输出
个性化设置Tag
准确显示调用方法、行,快速定位所在文件位置
支持android系统对象Intent、Bundle打印
提供release-no-op版本
支持日志写入文件
https://github.com/pengwei1024/LogUtils
implementation 'com.apkfuns.logutils:library:1.5.1.1'
//----日志写入到文件
compile 'com.apkfuns.log2file:log2file:1.0.0'
...
若本地已经依赖okio(如pokhttp)请排除
compile('com.apkfuns.log2file:log2file:1.0.0') {
exclude module: 'okio'
}
- ####ImmersionBar – android 4.4以上沉浸式实现
android 4.4以上沉浸式状态栏和沉浸式导航栏管理,包括状态栏字体颜色,一句代码轻松实现,以及对bar的其他设置
https://github.com/gyf-dev/ImmersionBar
http://www.jianshu.com/p/2a884e211a62
implementation 'com.gyf.barlibrary:barlibrary:2.3.0'
- ####FadingActionBar
Android库实现了动作条的衰落效果,类似于Play Music应用程序中的效果
https://github.com/ManuelPeinado/FadingActionBar
compile 'com.github.manuelpeinado.fadingactionbar:fadingactionbar:3.1.2'
Java依赖包
- ###joda-time
jdk中时间类型的相互转换,时间使用
Home:http://joda-time.sourceforge.net/
官方文档:http://joda-time.sourceforge.net/apidocs/index.html
implementation 'joda-time:joda-time:2.9.9'
二维码
- ###ZXing
ZXing二维码扫描
https://github.com/zxing/zxing
implementation 'com.google.zxing:core:3.3.0'
轮播图框架
- ###view-pager-transforms
广告轮播图
https://github.com/ToxicBakery/ViewPagerTransforms
compile 'com.bigkoo:convenientbanner:2.0.5'
compile 'com.ToxicBakery.viewpager.transforms:view-pager-transforms:1.2.32@aar'
NavigationView外层必须包一层DrawerLayout
数据库框架
- ###GreenDao
数据库
//1,
dependencies {
classpath 'org.greenrobot:greendao-gradle-plugin:3.2.2'
}
//2,
apply plugin: 'org.greenrobot.greendao' // 添加应用依赖插件
//3,添加库文件
dependencies {
compile 'org.greenrobot:greendao:3.2.2'
}
//4,初始化GreenDao配置
greendao {
schemaVersion 1
daoPackage 'xx.xx.db'//包名
targetGenDir 'src/main/java'
generateTests true
targetGenDirTests 'src/androidTest/gen'
}
gson
json解析
implementation 'com.google.code.gson:gson:2.8.2'
compile 'com.google.code.gson:gson:2.8.2'