Android常用框架汇总

这篇博客汇总了Android开发中常用的框架,包括网络访问如Retrofit、OkHttp3,图片加载如Glide、Picasso,注解库如androidannotations、butterknife,以及RxJava、GreenDao数据库框架等,还有RecyclerView、文件下载、图片选择等多个组件和工具库。
摘要由CSDN通过智能技术生成

android开发常用的框架汇总,实时更新中

网络访问

Retrofit

Gradle:

latestVersion:2.1.0
compile 'com.squareup.retrofit2:retrofit:latestVersion'

CallAdapters:

RxJava - com.squareup.retrofit2:adapter-rxjava
Guava  - com.squareup.retrofit2:adapter-guava
Java 8 - com.squareup.retrofit2:adapter-java8

Converter:

Gson - com.squareup.retrofit2:converter-gson
Jackson - com.squareup.retrofit2:converter-jackson
Moshi - com.squareup.retrofit2:converter-moshi
Protobuf - com.squareup.retrofit2:converter-protobuf
Wire - com.squareup.retrofit2:converter-wire
Simple Framework - com.squareup.retrofit2:converter-simpleframework
Scalars - com.squareup.retrofit2:converter-scalars

Github:https://github.com/square/retrofit

OkHttp3

Gradle:

latestVersion:3.4.1

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

Github:https://github.com/square/okhttp

okhttp-utils

国内大神鸿洋封装的OkHttp3工具类

Gradle:

latestVersion:2.6.2
compile 'com.zhy:okhttputils:latestVersion'

Github:https://github.com/hongyangAndroid/okhttputils

android-async-http

Gradle:

latestVersion:1.4.9

repositories {
  mavenCentral()
}

dependencies {
  compile 'com.loopj.android:android-async-http:latestVersion'
}

Github:https://github.com/loopj/android-async-http

xUtils3

Gradle:

latestVersion:3.3.36
compile 'org.xutils:xutils:latestVersion'

Github:https://github.com/wyouflf/xUtils3

图片加载

Glide

Gradle:

latestVersion:3.7.0
repositories {
  mavenCentral() 
}

dependencies {
  compile 'com.github.bumptech.glide:glide:latestVersion'
  compile 'com.android.support:support-v4:XX.x.X'
}

Github:https://github.com/bumptech/glide

picasso

Gradle:

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

Github:https://github.com/square/picasso

fresco

Gradle:

latestVersion:0.13.0
compile 'com.facebook.fresco:fresco:latestVersion'

Github:https://github.com/facebook/fresco

picasso

Gradle:

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

Github:https://github.com/square/picasso

头像圆图

Gradle:

 compile 'de.hdodenhof:circleimageview:2.1.0'

Github:https://github.com/hdodenhof/CircleImageView

IconFont - Android-Iconics

现在有一个简单,快速,小巧的解决方案! – IconFont

Github:https://github.com/mikepenz/Android-Iconics

transformation库

一个基于Glide的transformation库,拥有裁剪,着色,模糊,滤镜等多种转换效果

Github:https://github.com/wasabeef/glide-transformations

PhotoView

PhotoView 是一款扩展自Android ImageView ,支持通过单点/多点触摸来进行图片缩放的智能控件。

Github:https://github.com/chrisbanes/PhotoView

注解

androidannotations

Gradle:

latestVersion:4.1.0 

根Gradle:

buildscript {
    repositories {
      mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:X.X.X'
        classpath 'com.neenbedankt.gradle.plugins:android-apt:X.X'
    }
}

repositories {
    mavenCentral()
    mavenLocal()
}

appGradle:

apply plugin: 'com.android.application'
apply plugin: 'android-apt'
def AAVersion = 'latestVersion'

dependencies {
    apt "org.androidannotations:androidannotations:$AAVersion"
    compile "org.androidannotations:androidannotations-api:$AAVersion"
}

apt {
    arguments {
          androidManifestFile variant.outputs[0]?.processResources?.manifestFile
    }
}

Github:https://github.com/excilys/androidannotations

butterknife

Gradle:

latestVersion:8.4.0

根Gradle:

buildscript {
  repositories {
    mavenCentral()
   }
  dependencies {
    classpath 'com.neenbedankt.gradle.plugins:android-apt:X.X'
  }
}

appGradle:

apply plugin: 'android-apt'

android {
  ...
}

dependencies {
  compile 'com.jakewharton:butterknife:latestVersion'
  apt 'com.jakewharton:butterknife-compiler:latestVersion'
}

Github:https://github.com/JakeWharton/butterknife

RxJava

Gradle:

1.X
compile ‘io.reactivex:rxjava:1.2.0’
compile ‘io.reactivex.rxjava:rxandroid:1.2.1’

2.X
compile ‘io.reactivex.rxjava2:rxjava:2.0.0-RC2’
compile ‘io.reactivex.rxjava2:rxandroid:2.0.0-RC1’

Github:https://github.com/ReactiveX/RxJava

数据库

GreenDao

Gradle:

latestVersion:3.1.1

根Gradle
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath ‘org.greenrobot:greendao-gradle-plugin:3.1.1’
}
}

app.Gradle

apply plugin: 'org.greenrobot.greendao'

dependencies {
    compile 'org.greenrobot:greendao:3.1.1'
}

Github:https://github.com/greenrobot/greenDAO

广告栏控件

Gradle:
latestVersion:2.0.5

 compile 'com.bigkoo:convenientbanner:2.0.5'

Github:https://github.com/saiwu-bigkoo/Android-ConvenientBanner

RecyclerView

BaseRecyclerViewAdapterHelper

Gradle:
latestVersion:2.2.2

compile ‘com.github.CymChad:BaseRecyclerViewAdapterHelper:2.2.2’

Github:https://github.com/CymChad/BaseRecyclerViewAdapterHelper

文件下载

FileDownloader

支持断点下载、多任务下载
Gradle:
latestVersion:1.3.0

compile ‘com.liulishuo.filedownloader:library:1.3.0’

Github: com.liulishuo.filedownloader:library:1.3.0

图片选择

MultiImageSelector

Gradle Version:
latestVersion:1.2

 compile 'com.github.lovetuzitong:MultiImageSelector:1.2'

GitHub:https://github.com/lovetuzitong/MultiImageSelector

PictureSelector

Android多图选择器 图片/视频 单选or多选,以及视频录制。

Gradle Version:
latestVersion:1.2.7

 compile 'com.github.LuckSiege.PictureSelector:picture_library:v1.2.7' 

GitHub:https://github.com/LuckSiege/PictureSelector

BageView

GitHub:https://github.com/qstumn/BadgeView

Alerter

GitHub:https://github.com/Tapadoo/Alerter

SlideView

GitHub:https://github.com/Tapadoo/Alerter

Dachshund Tab Layout

GitHub:https://github.com/Andy671/Dachshund-Tab-Layout

Android-PickerView

GitHub:https://github.com/Bigkoo/Android-PickerView

PhotoView

GitHub:https://github.com/chrisbanes/PhotoView

PhotoView 是一款扩展自Android ImageView ,支持通过单点/多点触摸来进行图片缩放的智能控件。

特性:

  1. 支持单点/多点触摸,即时缩放图片;
  2. 支持平滑滚动;
  3. 在滑动父控件下能够运行良好;(例如:ViewPager)
  4. 当用户的触点改变是可以触发通知;

NumberProgressBar

GitHub:https://github.com/daimajia/NumberProgressBar

!这里写图片描述

MarqueeView

Github: https://github.com/sfsheng0322/MarqueeView

俗名:垂直跑马灯
学名:垂直翻页公告

vlayout

Github: https://github.com/alibaba/vlayout


!这里写图片描述

SimpleRatingBar

Github: [https://github.com/FlyingPumba/SimpleRatingBar]
(https://github.com/FlyingPumba/SimpleRatingBar)

DiscreteScrollView

Github: https://github.com/yarolegovich/DiscreteScrollView

ShortcutBadger

应用程序的桌面图标,显示未读消息数
Github: https://github.com/leolin310148/ShortcutBadger
这里写图片描述

Android 7.0桌面快捷键

Github: https://github.com/michelelacorte/AndroidAppShortcuts
这里写图片描述

图片压缩框架

Github: https://github.com/Sunzxyong/Tiny

倾斜的ImageView

Github: https://github.com/akshay2211/Oblique]

可拓展的指纹识别

现在已适配:三星、魅族
Github: https://github.com/uccmawei/FingerprintIdentify]

SwitchButton

Github: https://github.com/kyleduo/SwitchButton]

SwitchButton

Github: https://github.com/zcweng/SwitchButton]

ByeBurger

一个极其简便的快速实现隐藏标题栏和导航栏的库。
Github: ByeBurger]

这里写图片描述

这里写图片描述

这里写图片描述

ScalingLayout

Github: ScalingLayout

Demo

这里写图片描述

Fab Demo

这里写图片描述

Spotify Search Demo

这里写图片描述

时间选择器

Github: linear-time-picker

1、volley 项目地址 https://github.com/smanikandan14/Volley-demo (1) JSON,图像等的异步下载; (2) 网络请求的排序(scheduling) (3) 网络请求的优先级处理 (4) 缓存 (5) 多级别取消请求 (6) 和Activity和生命周期的联动(Activity结束时同时取消所有网络请求) 2、android-async-http 项目地址:https://github.com/loopj/android-async-http 文档介绍:http://loopj.com/android-async-http/ (1) 在匿名回调中处理请求结果 (2) 在UI线程外进行http请求 (3) 文件断点上传 (4) 智能重试 (5) 默认gzip压缩 (6) 支持解析成Json格式 (7) 可将Cookies持久化到SharedPreferences 3、Afinal框架 项目地址:https://github.com/yangfuhai/afinal 主要有四大模块: (1) 数据库模块:android中的orm框架,使用了线程池对sqlite进行操作。 (2) 注解模块:android中的ioc框架,完全注解方式就可以进行UI绑定和事件绑定。无需findViewById和setClickListener等。 (3) 网络模块:通过httpclient进行封装http数据请求,支持ajax方式加载,支持下载、上传文件功能。 (4) 图片缓存模块:通过FinalBitmap,imageview加载bitmap的时候无需考虑bitmap加载过程中出现的oom和android容器快速滑动时候出现的图片错位等现象。 FinalBitmap可以配置线程加载线程数量,缓存大小,缓存路径,加载显示动画等。FinalBitmap的内存管理使用lru算法, 没有使用弱引用(android2.3以后google已经不建议使用弱引用,android2.3后强行回收软引用和弱引用,详情查看android官方文档), 更好的管理bitmap内存。FinalBitmap可以自定义下载器,用来扩展其他协议显示网络图片,比如ftp等。同时可以自定义bitmap显示器, 在imageview显示图片的时候播放动画等(默认是渐变动画显示)。 4、xUtils框架 项目地址:https://github.com/wyouflf/xUtils 主要有四大模块: (1) 数据库模块:android中的orm框架,一行代码就可以进行增删改查; 支持事务,默认关闭; 可通过注解自定义表名,列名,外键,唯一性约束,NOT NULL约束,CHECK约束等(需要混淆的时候请注解表名和列名); 支持绑定外键,保存实体时外键关联实体自动保存或更新; 自动加载外键关联实体,支持延时加载; 支持链式表达查询,更直观的查询语义,参考下面的介绍或sample中的例子。 (2) 注解模块:android中的ioc框架,完全注解方式就可以进行UI,资源和事件绑定; 新的事件绑定方式,使用混淆工具混淆后仍可正常工作; 目前支持常用的20种事件绑定,参见ViewCommonEventListener类和包com.lidroid.xutils.view.annotation.event。 (3) 网络模块:支持同步,异步方式的请求; 支持大文件上传,上传大文件不会oom; 支持GET,POST,PUT,MOVE,COPY,DELETE,HEAD,OPTIONS,TRACE,CONNECT请求; 下载支持301/302重定向,支持设置是否根据Content-Disposition重命名下载的文件; 返回文本内容的请求(默认只启用了GET请求)支持缓存,可设置默认过期时间和针对当前请求的过期时间。 (4) 图片缓存模块:加载bitmap的时候无需考虑bitmap加载过程中出现的oom和android容器快速滑动时候出现的图片错位等现象; 支持加载网络图片和本地图片; 内存管理使用lru算法,更好的管理bitmap内存; 可配置线程加载线程数量,缓存大小,缓存路径,加载显示动画等... 5、ThinkAndroid 项目地址:https://github.com/white-cat/ThinkAndroid 主要有以下模块: (1) MVC模块:实现视图与模型的分离。 (2) ioc模块:android中的ioc模块,完全注解方式就可以进行UI绑定、res中的资源的读取、以及对象的初始化。 (3) 数据库模块:android中的orm框架,使用了线程池对sqlite进行操作。 (4) http模块:通过httpclient进行封装http数据请求,支持异步及同步方式加载。 (5) 缓存模块:通过简单的配置及设计可以很好的实现缓存,对缓存可以随意的配置 (6) 图片缓存模块:imageview加载图片的时候无需考虑图片加载过程中出现的oom和android容器快速滑动时候出现的图片错位等现象。 (7) 配置器模块:可以对简易的实现配对配置的操作,目前配置文件可以支持Preference、Properties对配置进行存取。 (8) 日志打印模块:可以较快的轻易的是实现日志打印,支持日志打印的扩展,目前支持对sdcard写入本地打印、以及控制台打印 (9) 下载器模块:可以简单的实现多线程下载、后台下载、断点续传、对下载进行控制、如开始、暂停、删除等等。 (10) 网络状态检测模块:当网络状态改变时,对其进行检 6、LoonAndroid 项目地址:https://github.com/gdpancheng/LoonAndroid 主要有以下模块: (1) 自动注入框架(只需要继承框架内的application既可) (2) 图片加载框架(多重缓存,自动回收,最大限度保证内存的安全性) (3) 网络请求模块(继承了基本上现在所有的http请求) (4) eventbus(集成一个开源框架) (5) 验证框架(集成开源框架) (6) json解析(支持解析成集合或者对象) (7) 数据库(不知道是哪位写的 忘记了) (8) 多线程断点下载(自动判断是否支持多线程,判断是否是重定向) (9) 自动更新模块 (10) 一系列工具类
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值