Giter Club home page Giter Club logo

androidquick's Introduction

支持AndroidX,正在测试,欢迎提交issues与pr

不支持AndroidX请切换分支到2.x

目前2.x已在多个项目中使用,3.x还未用于正式生产项目,可以点此切换到2.x

如果你看到这个仓库,非常荣幸,如果想要用于您的项目中,建议先看源码,因为这是我用来做外包用来快速开发的库,里面很多内容适合我的项目但不一定适合您的项目,当然,如果需要,您可以clone源码中的部分代码用于您的项目中,如有雷同,不甚荣幸

Gradle(使用前请查看注意事项):

// 支持AndroidX

// quicklib(Base)
implementation 'com.sdwfqin.quicklib:quicklib:3.0.0-beta2'
// 如果使用butterknife请添加【可选】
annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0'

// 支付模块
implementation 'com.sdwfqin.quicklib:paylib:3.0.0-beta3'

// Android 图片加载库(Glide封装)
implementation 'com.sdwfqin.quick:imageloader:3.0.0-beta1'

// Android 自定义View组件
implementation 'com.sdwfqin.quick:widget:3.0.0-beta1'

==================== AndroidX 分界线 ====================

// 不支持AndroidX

// quicklib(Base)
implementation 'com.sdwfqin.quicklib:quicklib:2.3.0'
// 如果使用butterknife请添加【可选】
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'

// 支付模块
implementation 'com.sdwfqin.quicklib:paylib:1.0.5'

// Android 图片加载库(Glide封装)
implementation 'com.sdwfqin.quick:imageloader:2.0.2'

// Android 自定义View组件
implementation 'com.sdwfqin.quick:widget:1.0.7'

最低支持api18

minSdkVersion 18
targetSdkVersion 28

早期版本

1.x文档

需要注意!!!

  1. quicklib依赖QMUI,需要在主项目中配置QMUIstyles,可参考app项目中的相应代码。

  2. 需要注意quicklib中的QuickInit类,需要的话请在Application中初始化(一般用不到)。

  3. quicklibqrscanwidget这几个模块因为项目引入了AndroidUtilCode,所以需要在Application初始化Utils.init(this);

  4. 请在module的build.gradle#android中添加如下代码:

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

关于支付模块支付宝支付的特殊说明

因支付宝SDK改用aar打包,所以使用时需要添加如下代码

  1. 在您项目根目录的build.gradle中,添加下面的内容,将libs目录作为依赖仓库

    allprojects {
        repositories {
    
            // 添加下面的内容
            flatDir {
                dirs '../libs'
            }
    
            // ... jcenter() 等其他仓库
        }
    }
  2. 请将支付宝的aar文件放入您项目根目录的libs目录中(没有可以新建,文件名字不要变,文件夹名字跟上面的名字匹配起来就可以)

支持Mvp与Mvc模式

  1. 如果使用Mvc模式,直接继承BaseActivity/BaseFragment即可
  2. 如果使用Mvp模式,需要继承MvpActivity/MvpFragment,并且Contract接口或Presenter/View接口需要继承BaseView与BasePresenter,Presenter实现类可以直接实现Presenter接口也可以继承SamplePresenter类并实现Presenter接口,他们的区别是SamplePresenter里面实现了BasePresenter的接口处理了View绑定
  3. 网络部分可以参考DemoApp下面的mvpretrofit

使用方法

Wiki

更新文档

更新文档

混淆

可参考Sample混淆文件

其他

热更新(Tinker)、Retrofit封装可参考Sample

功能

  1. quicklib
文件名称 功能
BaseActivity
BaseFragment
BaseMvpActivity
BaseMvpFragment
RxPresenter Presenter层封装
WechatShareTools 微信分享工具类
SeeImageActivity 图片预览Activity(多图/单图)
BaseWebView ViewActivity基类
WebViewActivity 传入url即可
WebViewLoadDataActivity 针对非url链接的网页
GsonUtil Gson工具类
RxSchedulersUtils compose()统一线程处理
RxTimerUtil RxJava定时任务
EventBusUtil EventBus工具类,使用时需要配合Base基类
HintDialog 可配置提示弹窗
BottomDialogPhotoFragment 一个简单的可配置底部弹窗
AppManager Activity栈管理
QuickExecutor 线程池
ImageWatermarkUtils 图片水印工具类
IClickListener 按钮防抖
  1. paylib
文件名称 功能
AliPayTools 支付宝支付工具类
WechatPayTools 微信支付工具类
  1. widget
文件名称 功能
PictureUploadView 九宫格图片上传view
PayPwdInputView 自定义验证码/密码View
ClickViewPager 可以点击的ViewPager
DecimalEditText Double类型的EditText,支持限定小数点后的位数
NoScrollViewPager 可以禁止左右滑动的ViewPager
TrembleButton 可以漂浮颤抖的按钮
WrapContentHeightViewPager 处理NestedScrollView嵌套Viewpager+RecyclerView
AutoPollRecyclerView 跑马灯样式的RecyclerView(自动滚动)
AmountView 购物车商品数量选择
AutoLinesLayoutManager 自动换行的布局管理器(流式布局),建议使用flexbox-layout代替
  1. imageloader
文件名称 功能
ImageLoader 图片加载
CircleProgressView 加载进度View

androidquick's People

Contributors

sdwfqin avatar

Watchers

Arisus avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.