您的位置:首页 > 移动开发 > Android开发

Android中可能会用到的框架/API(持续更新)

2017-02-13 21:12 381 查看
Rxjava-异步任务

ButterKnife-注解布局

retrofit-安全网络请求

RxLiftcycle-管理Rxjava生命周期

RxPermission-管理60后的权限

RxBinding-绑定组件方便异步调用

leakcanary-检查内存泄露

dagger2-快速依赖注入

glide-加载图片库可以是GIF

Picasso-加载图片

volley-网络请求

okhttp-网络请求

拼写检查

BaseRecyclerViewAdapterHelper-多样式recycleview适配器库

recyclerview-animators-多种recycleview动画

CircleImageView-圆形头像

PhotoView-可根据手势对图像进行变换

FlycoTabLayout-多样式的tablayout库

FlycoDialog_Master-多样式dialog库

FlycoLabelView-添加角标的库

AndroidImageSlider-多动画展示banner

NumberProgressBar-炫酷的数字进度条

ijkplayer-Bilibili出品视频解码

DanmakuFlameMaster-Bilibili出品弹幕库

IjkPlayerView-基于ijkplayer的播放库集成了弹幕功能

ShineButton-炫酷的点击效果

图像识别

Rxjava-异步任务

Rxjava

引入依赖项

compile 'io.reactivex.rxjava2:rxjava:2.1.0'//Rxjava2的引入
//compile 'io.reactivex:rxjava:1.0.0'//Rxjava1的引入


ButterKnife-注解布局

ButterKnife

引入依赖项

compile 'com.jakewharton:butterknife:8.5.1'
//annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'//可以不用这句


retrofit-安全网络请求

retrofit

引入依赖项

compile 'com.squareup.retrofit2:retrofit:2.1.0'
//后面的在需要用的时候需要加上
//retrofit配合rxjava使用
compile 'com.squareup.retrofit2:adapter-rxjava:2.0.0'
//Gson:
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
//Jackson:
compile 'com.squareup.retrofit2:converter-jackson:2.1.0'
//Moshi:
compile  'com.squareup.retrofit2:converter-moshi:2.1.0'
//Protobuf:
compile  'com.squareup.retrofit2:converter-protobuf:2.1.0'
//Wire:
compile  'com.squareup.retrofit2:converter-wire:2.1.0'
//Simple XML:
compile  'com.squareup.retrofit2:converter-simplexml:2.1.0'
//Scalars (primitives, boxed, and String):
compile 'com.squareup.retrofit2:converter-scalars:2.1.0'


RxLiftcycle-管理Rxjava生命周期

RxLifecycle(管理Rxjava的生命周期,避免内存泄露)

引入依赖项

compile 'com.trello:rxlifecycle:1.0'

// If you want to bind to Android-specific lifecycles
compile 'com.trello:rxlifecycle-android:1.0'

// If you want pre-written Activities and Fragments you can subclass as providers
compile 'com.trello:rxlifecycle-components:1.0'

// If you want to use Navi for providers
compile 'com.trello:rxlifecycle-navi:1.0'

// If you want to use Kotlin syntax
compile 'com.trello:rxlifecycle-kotlin:1.0'


RxPermission-管理6.0后的权限

RxPermission(配合Rxjava获取Android6.0后面的权限)

引入依赖项

//for rxjava2
compile 'com.tbruyelle.rxpermissions2:rxpermissions:0.9.3@aar'

//for rxjava1
repositories {
jcenter() // If not already there
}
dependencies {
compile 'com.tbruyelle.rxpermissions:rxpermissions:0.9.3@aar'
}


RxBinding-绑定组件方便异步调用

RxBinging(配合Rxjava绑定组件方便异步调用)

引入依赖项

compile 'com.jakewharton.rxbinding2:rxbinding:2.0.0'


//在需要的时候添加上即可配合rxbinding使用
compile 'com.jakewharton.rxbinding2:rxbinding-support-v4:2.0.0'

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

compile 'com.jakewharton.rxbinding2:rxbinding-design:2.0.0'

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

compile 'com.jakewharton.rxbinding2:rxbinding-leanback-v17:2.0.0'


leakcanary-检查内存泄露

leakcanary(自动检查内存泄露,Java也可用,debug和release都可用)

引入依赖项

debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5'
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5'
testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5'


dagger2-快速依赖注入

dagger2(Android和Java下的快速依赖注入库)

引入依赖项

compile 'com.google.dagger:dagger:2.10'
annotationProcessor 'com.google.dagger:dagger-compiler:2.10'


glide-加载图片库(可以是GIF)

glide(可以加载GIF动态图或视频)

引入依赖项

compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.android.support:support-v4:19.1.0'


Picasso-加载图片

Picasso(加载图片)

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


volley-网络请求

volley

引入依赖项

compile 'com.mcxiaoke.volley:library:1.0.19'


okhttp-网络请求

khttp

引入依赖项

compile 'com.squareup.okhttp3:okhttp:3.6.0'


拼写检查

TextServicesManager,通过该Manger创建SpellCheckerSession

BaseRecyclerViewAdapterHelper-多样式recycleview适配器库

BaseRecyclerViewAdapterHelper(RecycleView适配器的库,有多种adapter)

引入依赖项

先在 build.gradle(Project:XXXX) 的 repositories 添加:

allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}


然后在 build.gradle(Module:app) 的 dependencies 添加:

dependencies {
compile 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.1.1'
}


recyclerview-animators-多种recycleview动画

recyclerview-animators(RecycleView的动画库,集成了很多动画)

引入依赖项

compile 'jp.wasabeef:recyclerview-animators:2.2.6'


CircleImageView-圆形头像

CircleImageView(圆形头像)

引入依赖项

compile 'de.hdodenhof:circleimageview:2.1.0'


PhotoView-可根据手势对图像进行变换

PhotoView(根据手势对图像进行变换)

引入依赖项

Add this in your root build.gradle file (not your module build.gradle file):

allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}


Then, add the library to your module build.gradle

dependencies {
compile 'com.github.chrisbanes:PhotoView:latest.release.here'
}


FlycoTabLayout-多样式的tablayout库

FlycoTabLayout(很多样式的tablayout库)

引入依赖项

compile 'com.android.support:support-v4:23.1.1'
compile 'com.flyco.tablayout:FlycoTabLayout_Lib:2.1.2@aar'


FlycoDialog_Master-多样式dialog库

FlycoDialog_Master(很多样式的dialog库)

引入依赖项

compile 'com.flyco.dialog:FlycoDialog_Lib:1.3.2@aar'


FlycoLabelView-添加角标的库

FlycoLabelView(添加角标的库)

引入依赖项

compile 'com.flyco.labelview:FlycoLabelView_Lib:1.0.2@aar'


AndroidImageSlider-多动画展示banner

AndroidImageSlider(多种动画效果展示Banner的库,需要依赖picasso和nineoldandroids这两个库)

引入依赖项

compile "com.android.support:support-v4:+..."
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.slider:library:1.1.5@aar'


NumberProgressBar-炫酷的数字进度条

NumberProgressBar(炫酷的数字进度条)

引入依赖项

compile 'com.daimajia.numberprogressbar:library:1.4@aar'


ijkplayer-Bilibili出品视频解码

ijkplayer(Bilibili出品的视频解码库)

引入依赖项

# required
allprojects {
repositories {
jcenter()
}
}


dependencies {
# required, enough for most devices.
compile 'tv.danmaku.ijk.media:ijkplayer-java:0.7.8.1'
compile 'tv.danmaku.ijk.media:ijkplayer-armv7a:0.7.8.1'

# Other ABIs: optional
compile 'tv.danmaku.ijk.media:ijkplayer-armv5:0.7.8.1'
compile 'tv.danmaku.ijk.media:ijkplayer-arm64:0.7.8.1'
compile 'tv.danmaku.ijk.media:ijkplayer-x86:0.7.8.1'
compile 'tv.danmaku.ijk.media:ijkplayer-x86_64:0.7.8.1'

# ExoPlayer as IMediaPlayer: optional, experimental
compile 'tv.danmaku.ijk.media:ijkplayer-exo:0.7.8.1'
}


DanmakuFlameMaster-Bilibili出品弹幕库

DanmakuFlameMaster(Bilibili出品的弹幕库)

引入依赖项

repositories {
jcenter()
}


dependencies {
compile 'com.github.ctiao:DanmakuFlameMaster:0.7.3'
compile 'com.github.ctiao:ndkbitmap-armv7a:0.7.3'

# Other ABIs: optional
compile 'com.github.ctiao:ndkbitmap-armv5:0.7.3'
compile 'com.github.ctiao:ndkbitmap-x86:0.7.3'
}


IjkPlayerView-基于ijkplayer的播放库,集成了弹幕功能

IjkPlayerView(基于ijkplayer的播放库,封装进了部分弹幕功能)

引入依赖项

allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}


compile 'com.github.Rukey7:IjkPlayerView:1.0.3'


ShineButton-炫酷的点击效果

ShineButton(酷酷的按钮效果,适合做分享,点赞等)

引入依赖项

buildscript {
repositories {
mavenCentral()
}
}


dependencies {
compile 'com.sackcentury:shinebutton:0.1.7'
}


图像识别

Google Play Services Vision,通过gradle dependency引入可以,继承了人脸识别、二维码识别、文字识别。GitHub

引入以下依赖项

compile 'com.google.android.gms:play-services-vision:10.0.1'


Google Play services APIDescription in build.gradle
Google+com.google.android.gms:play-services-plus:10.0.1
Google Account Logincom.google.android.gms:play-services-auth:10.0.1
Google Actions, Base Client Librarycom.google.android.gms:play-services-base:10.0.1
Google Address APIcom.google.android.gms:play-services-identity:10.0.1
Firebase App Indexingcom.google.firebase:firebase-appindexing:10.0.1
Google Analyticscom.google.android.gms:play-services-analytics:10.0.1
Google Awarenesscom.google.android.gms:play-services-awareness:10.0.1
Google Castcom.google.android.gms:play-services-cast:10.0.1
Google Cloud Messagingcom.google.android.gms:play-services-gcm:10.0.1
Google Drivecom.google.android.gms:play-services-drive:10.0.1
Google Fitcom.google.android.gms:play-services-fitness:10.0.1
Google Location and Activity Recognitioncom.google.android.gms:play-services-location:10.0.1
Google Mapscom.google.android.gms:play-services-maps:10.0.1
Google Mobile Adscom.google.android.gms:play-services-ads:10.0.1
Google Placescom.google.android.gms:play-services-places:10.0.1
Mobile Visioncom.google.android.gms:play-services-vision:10.0.1
Google Nearbycom.google.android.gms:play-services-nearby:10.0.1
Google Panorama Viewercom.google.android.gms:play-services-panorama:10.0.1
Google Play Game servicescom.google.android.gms:play-services-games:10.0.1
SafetyNetcom.google.android.gms:play-services-safetynet:10.0.1
Android Paycom.google.android.gms:play-services-wallet:10.0.1
Android Wearcom.google.android.gms:play-services-wearable:10.0.1
该表摘自Google APIs for Android
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  android 框架