FastLib 是一个整合了常用主流开源项目的 Android 快速搭建UI库, 其中包含 Retrofit、RxJava 、RxAndroid、RxLifecycle等三方库, 并且提供较多的基础Activity与Fragment如快速搭建微信类tab+fragment 的FastMainActivity、快速搭建包含TitleBar的FastTitleActivity及FastTitleFragment、快速搭建列表刷新的FastRefreshLoadActivity及FastRefreshLoadFragment;并提供快速配置Retrofit相关功能的FastRetrofit:解决添加统一请求header及多url等常见功能。
FastLib 只是一个快速搭建UI及网络请求的库,是常用三方库的一个封装集合,本身不具备框架特性。可在此基础上做MVP、MVVM等框架的扩展。
wiki 基于FastLib 2.2.12 、Android Studio 3.3.1、Gradle 4.10.1版本编写,后期重大变更会同步更新。
Demo中使用到的网络请求api来源于readhub 版权及最终解释权归readhub所有,如有侵权请联系删除!
其它功能请在demo中发现,详细使用请看wiki
1、2.2.13_beta12版本开始自带混淆规则,并且会自动导入,正常情况下无需手动导入。
2、2.2.13_beta12以下版本可参考proguard-rules.pro
伴随新版本 2.3.6 发布,项目增加一个模板项目 template 以完成基础配置,开发者可直接在此项目上进行开发方便。
2.4.0
2.3.2
2.2.13
2.2.11-androidx
2.2.11
2.2.10-beta6
2.2.9-beta6
2.2.9-beta5
2.1.5 更新
2.1.0 更新
快速实现页面下拉刷新-全局控制及局部个性化-参考WebActivity、FastRefreshActivity、MineFragment
虚拟导航栏控制-参考AppImpl类 NavigationBarControl接口实现注释说明
DoraemonKit集成效果(一定要手动开启 悬浮窗权限
)-包括沉浸式及UI微调-无法直接显示点击可查看效果
Gradle集成-尽量使用正式版本
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
dependencies {
implementation 'com.github.AriesHoo:FastLib:x.y.z'
}
Maven集成
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependency>
<groupId>com.github.AriesHoo</groupId>
<artifactId>FastLib</artifactId>
<version>x.y.z</version>
</dependency>
Compile集成
implementation project(':fastLib')
包含第三方库
compileSdkVersion = 28
minSdkVersion = 19
minLibSdkVersion = 15
targetSdkVersion = 28
supportVersion = "1.1.0"
widgetVersion = "3.2.25"
smartRefreshLayoutVersion = "2.0.3"
BRVAHVersion = "3.0.4"
agentwebVersion = "4.1.4"
glideVersion = "4.12.0"
butterknifeVersion = "10.2.3"
versionCode = 249
versionName = "2.4.0"
dependencies {
compileOnly "com.google.android.material:material:".concat(supportVersion)
compileOnly 'androidx.appcompat:appcompat:'.concat(supportVersion)
compileOnly "androidx.recyclerview:recyclerview:".concat(supportVersion)
//万能适配器
compileOnly 'com.github.CymChad:BaseRecyclerViewAdapterHelper:'.concat(BRVAHVersion)
//webView库
compileOnly 'com.just.agentweb:agentweb:'.concat(agentwebVersion)
//下拉刷新库
// compileOnly 'com.scwang.smartrefresh:SmartRefreshLayout:1.1.0-andx-14'
compileOnly 'com.scwang.smart:refresh-layout-kernel:'.concat(smartRefreshLayoutVersion)
//图片加载
compileOnly 'com.github.bumptech.glide:glide:'.concat(glideVersion)
//常用UI控件(TitleBarView、RadiusView等)
api "com.github.AriesHoo.UIWidget:widget-core:".concat(widgetVersion)
//快速Tab库
compileOnly "com.github.AriesHoo.UIWidget:tab-layout:".concat(widgetVersion)
//日志打印
api 'com.orhanobut:logger:2.2.0'
//注解
api 'com.jakewharton:butterknife:'.concat(butterknifeVersion)
//retrofit+rxjava 网络请求及数据解析相关
api "io.reactivex.rxjava2:rxjava:2.2.20"
api 'io.reactivex.rxjava2:rxandroid:2.1.1'
api 'com.squareup.retrofit2:retrofit:2.9.0'
api 'com.squareup.retrofit2:converter-gson:2.9.0'
api 'com.squareup.retrofit2:adapter-rxjava2:2.9.0'
//3.12.x是支持Android 4.4的
api 'com.squareup.okhttp3:logging-interceptor:3.12.2'
api 'com.google.code.gson:gson:2.8.5'
//处理rxjava内存泄漏-生命周期绑定
api 'com.trello.rxlifecycle3:rxlifecycle-components:3.1.0'
//滑动返回Activity
compileOnly 'cn.bingoogolapple:bga-swipebacklayout:2.0.1@aar'
//页面事件交互-androideventbus-停止维护
compileOnly 'org.simple:androideventbus:1.0.5.1'
//页面事件交互-eventbus
compileOnly 'org.greenrobot:eventbus:3.1.1'
//多状态视图切换
api 'com.github.Bakumon:StatusLayoutManager:1.0.4'
}
Retrofit
是 Square
出品的网络请求库,极大的减少了 Http 请求的代码和步骤RxJava
提供优雅的响应式 API 解决异步请求以及事件处理RxAndroid
为 Android 提供响应式 APIRxlifecycle
,在 Android 上使用 RxJava
都知道的一个坑,就是生命周期的解除订阅,这个框架通过绑定 Activity 和 Fragment 的生命周期完美解决该问题Okhttp
同样 Square
出品,不多介绍,做 Android 的都应该知道Gson
是 Google
官方的 Json Convert 框架Butterknife
是 JakeWharton
大神出品的 View 注入框架AndroidEventBus
是一个轻量级的 EventBus
,提供TAG支持Logger
是 orhanobut
出品的 Log 框架,FastLib
提供相关封装类LoggerManager
Glide
是Google
推荐的图片加载库,FastLib
提供相关封装类GlideManager
BaseRecyclerViewAdapterHelper
是陈宇明
封装的RecyclerView 适配器帮助类SmartRefreshLayout
是scwang90
封装的刷新库,扩展性很强AgentWeb
是Justson
封装的原生WebView库,使用方便扩展性很强BGASwipeBackLayout
是bingoogolapple-王浩
封装的微信效果的Activity滑动返回库StatusLayoutManager
是Bakumon
封装的多状态控制管理工具,方便实现加载中、加载失败、网络错误等状态TabLayout
是AriesHoo
forked from FlycoTabLayout
并加以优化调整的主界面tab、滑动tab、分段选择器tab功能库UIWidget
是AriesHoo
封装的常用UI库(TitleBarView、RadiusView、StatusViewHelper、NavigationViewHelper等)Copyright 2017-2021Aries Hoo
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。