Android官方
代码语言:javascript复制implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
我的常用组件
Kotlin & anko
anko
project - build.gradle
代码语言:javascript复制buildscript {
ext.kotlin_version = '1.1.51'
//....
dependencies {
//...
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
app - build.gradle
代码语言:javascript复制apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
compile "org.jetbrains.anko:anko-commons:0.10.4"
}
权限
XPermission
最快最简单的方式适配Android6.0权限- PermissionsDispatcher 不推荐使用
Adapter
BaseRecyclerViewAdapterHelper
implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.30'
RX
RxAndroid
implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
implementation 'io.reactivex.rxjava2:rxjava:2.1.10'
implementation 'com.jakewharton.rxbinding2:rxbinding:2.1.1'
implementation 'com.trello.rxlifecycle2:rxlifecycle:2.2.1'
implementation 'com.trello.rxlifecycle2:rxlifecycle-components:2.2.1'
HTTP & JSON
okhttp-OkGo
fastjson
//网络请求
implementation 'com.lzy.net:okgo:3.0.4'
implementation 'com.lzy.net:okrx2:2.0.2'
//JSON
implementation 'com.alibaba:fastjson:1.2.46'
数据库
android-lite-orm
引用Jar包
事件总线
EventBus
implementation 'org.greenrobot:eventbus:3.0.0'
图片加载
Glide
OR glide-transformations
选其一
//Glide
implementation 'com.github.bumptech.glide:glide:3.7.0'
//glide-transformations
implementation 'jp.wasabeef:glide-transformations:3.1.1'
implementation 'jp.co.cyberagent.android.gpuimage:gpuimage-library:1.4.1'
Gif加载
android-gif-drawable
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2. '
图片圆角&背景圆角
图片圆角RoundedImageView
背景圆角FlycoRoundView
//图片圆角
implementation 'com.makeramen:roundedimageview:2.3.0'
//背景圆角
implementation 'com.flyco.roundview:FlycoRoundView_Lib:1.1.4@aar'
消息提示
Toasty
implementation 'com.github.GrenderG:Toasty:1.2.8'
弹出窗口
Material Dialogs
dependencies {
implementation 'com.afollestad.material-dialogs:core:0.9.6.0'
}
事件视图绑定
Butterknife
dependencies {
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
}
如果编程语言为Kotlin
, 替换 annotationProcessor
为 kapt
圆状进度
CircleProgressBar
//圆状进度
implementation 'com.dinuscxj:circleprogressbar:1.1.1'
Banner
BGABanner-Android
//Banner
implementation 'cn.bingoogolapple:bga-banner:2.2.4@aar'
标签云
TagCloudView
//标签云
compile 'com.github.kingideayou:tagcloudview:1.0.2'
多条件筛选菜单
DropDownMenu
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
dependencies {
compile 'com.github.dongjunkun:DropDownMenu:1.0.4'
}
仿iOS Segment
SHSegmentControl
implementation 'com.7heaven.widgets:segmentcontrol:1.17'
加载HTML的TextView
html-textview
dependencies {
implementation 'org.sufficientlysecure:html-textview:3.5'
}
自定义弹出层
CustomPopwindow
allprojects {
epositories {
//...
maven {
url 'https://jitpack.io'
}
}
dependencies {
compile 'com.github.pinguo-zhouwei:CustomPopwindow:2.1.1'
}
应用崩溃检测服务
Bugly
compile 'com.tencent.bugly:crashreport:latest.release'