我常用的Android库

2019-10-22 16:52:27 浏览数 (1)

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

代码语言:javascript复制
implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.30'

RX

RxAndroid

代码语言:javascript复制
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

代码语言:javascript复制
//网络请求
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

代码语言:javascript复制
引用Jar包

事件总线

EventBus

代码语言:javascript复制
implementation 'org.greenrobot:eventbus:3.0.0'

图片加载

Glide OR glide-transformations 选其一

代码语言:javascript复制
//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

代码语言:javascript复制
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2. '

图片圆角&背景圆角

图片圆角RoundedImageView

背景圆角FlycoRoundView

代码语言:javascript复制
//图片圆角
implementation 'com.makeramen:roundedimageview:2.3.0'
//背景圆角
implementation 'com.flyco.roundview:FlycoRoundView_Lib:1.1.4@aar'

消息提示

Toasty

代码语言:javascript复制
implementation 'com.github.GrenderG:Toasty:1.2.8'

弹出窗口

Material Dialogs

代码语言:javascript复制
dependencies {
    implementation 'com.afollestad.material-dialogs:core:0.9.6.0'
}

事件视图绑定

Butterknife

代码语言:javascript复制
dependencies {
  implementation 'com.jakewharton:butterknife:8.8.1'
  annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
}

如果编程语言为Kotlin, 替换 annotationProcessorkapt

圆状进度

CircleProgressBar

代码语言:javascript复制
//圆状进度
implementation 'com.dinuscxj:circleprogressbar:1.1.1'

Banner

BGABanner-Android

代码语言:javascript复制
//Banner
implementation 'cn.bingoogolapple:bga-banner:2.2.4@aar'

标签云

TagCloudView

代码语言:javascript复制
//标签云
compile 'com.github.kingideayou:tagcloudview:1.0.2'

多条件筛选菜单

DropDownMenu

代码语言:javascript复制
allprojects {
    repositories {
        ...
        maven { url "https://jitpack.io" }
    }
}

dependencies {
    compile 'com.github.dongjunkun:DropDownMenu:1.0.4'
}

仿iOS Segment

SHSegmentControl

代码语言:javascript复制
implementation 'com.7heaven.widgets:segmentcontrol:1.17'

加载HTML的TextView

html-textview

代码语言:javascript复制
dependencies {
    implementation 'org.sufficientlysecure:html-textview:3.5'
}

自定义弹出层

CustomPopwindow

代码语言:javascript复制
allprojects {
    epositories {
        //...
        maven {
            url 'https://jitpack.io'
        }
}

dependencies {
	compile 'com.github.pinguo-zhouwei:CustomPopwindow:2.1.1'
}

应用崩溃检测服务

Bugly

代码语言:javascript复制
compile 'com.tencent.bugly:crashreport:latest.release'

0 人点赞