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

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

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Android_tv_metro是一款安卓版TV Metro框架和服务器APIAPI和数据结构专辑和显示项目:Metro风格是由两个元素构成专辑可以包含多张专辑和显示项目显示项目可以被定义为视频,游戏,应用程序,音乐等您可以从显示项目删除你自己的游戏/应用/视频详细条目主页也被定义为专辑。API风格API描述http://host/v1/ns/type/?id=res_id NS:命名空间,资源类型类型:项目或项目列表ID:后端服务器系统的资源ID详细信息http://host/game(video/app)/item?id=12346 return item list专辑http://host/game(video/app)/album?id=6464 return album类别http://host/game(video/app)/category?id=123456 return album注意:专辑和类别接近同一概念。选项卡“应用程序/游戏”选项卡“视频”选项卡“视频类别”首页JSON定义首页JSON示例服务器API定义请看:https://github.com/XiaoMi/android_tv_metro/raw/master/server/TVMarketAPI.md首页显示数据{    "data": [        {            "items": [display items],            "images": {},            "name": "TAB 1",            "id": "recommend",            "type": "album",            "ns": "video"        },        {            "items": [display item],            "images": {},            "name": "TAB 2",            "id": "recommend",            "type": "album",            "ns": "video"        }    ] }显示项目:{    "target": {        "type": "item"    },    "images": {        "back": {            "url": "",            "ani": {},            "pos": {}        }    },    "name": "Display Name)",    "times": {        "updated": 1409202939,        "created": 1409202939    },    "_ui": {        "layout": {            "y": 2,            "x": 3,            "w": 1,            "h": 1        },        "type": "metro_cell_banner"    },    "id": "987722",    "type": "item",    "ns": "video" }专辑{ "data": [     {         "items": [display items],         "images": { },         "name":"game tab name",         "times": {             "updated": 0,             "created": 0         },         "_ui": {             "type": "metro"         },         "id": "recommend",         "type": "album",         "ns": "game"     },     {         "items": [display items],         "images": { },         "name": "game tab Name",         "times": {             "updated": 0,             "created": 0         },         "_ui": {             "type": "metro"         },         "id": "categories",         "type": "album",         "ns": "game"     },     {         "items": [dispay items],         "images": { },         "name": "video tab name",         "times": {             "updated": 0,             "created": 0         },         "_ui": {             "type": "metro"         },         "id": "recommend",         "type": "album",         "ns": "video"     },     {         "items": [display items],         "images": { },         "name": "video tab name",         "times": {             "updated": 0,             "created": 0         },         "_ui": {             "type": "metro"         },         "id": "categories",         "type": "album",         "ns": "video"     } ], "preload": {     "images": [] }, "update_time": 0 }显示项目{ "target": {     "type": "item" }, "images": {     "text": {         "url": "",         "ani": {},         "pos": {}     },     "icon": {         "url": "",         "ani": {},         "pos": {}     },     "back": {         "url": "http://xxx/fffff.png",         "ani": {},         "pos": {}     },     "spirit": {         "url": "",         "ani": {},         "pos": {}     } }, "name": "name", "times": {     "updated": 1404466152,     "created": 1404454443 }, "_ui": {     "type": "metro_cell_banner",     "layout": {         "y": 1,         "x": 1,         "w": 1,         "h": 2     } }, "id": "180", "type": "item", "ns": "game" }TV Metro库和APIandroid库:提供一个建立sw540dp metro布局的框架API:服务器API和数据结构。该框架能够帮助您轻松构建一个TV metro UI风格的应用程序。至于具体的业务数据定义,你需要自己处理。android库:用于专辑的RecommendCardView Card浏览GenericSubjectLoader Loader(选项卡是专辑的一个实例)如何集成Android库?你只需要继承MainActivity并执行选项卡装载。请参阅TVMetroSample应用如何运行自己的服务器?1.定义你的主页数据2.执行您的详细资料/列表API下载测试APK下载测试APK,你可以在Android平板或电视运行点击下载设计文档:https://github.com/XiaoMi/android_tv_metro/raw/master/design/app_api.ppt 标签:Android
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值