Giter VIP home page Giter VIP logo

fastkotlin's Introduction

FastKotlin

用于自己快速开发的框架,加入了许多项目通用的东西,免去重复造轮子,待完善。。。

kotlin常用插件 JsonToKotlinClass同java的GsonFormat

use Gradle:

repositories {
  maven { url "https://jitpack.io" }
  mavenCentral()
  google()
}
dependencies {
  implementation 'com.github.czh235285:FastKotlin:1.3.5'
}

介绍

  • 一个简单的Demo,初学kotlin的可以看看,kotlin+rxjava2+retrofit2+mvp
  • 沉浸式状态栏,浅色状态栏。
  • 大量常用工具类,扩展函数
  • 网络请求用的 xsnow(基于Retrofit2二次封装的框架,缓存方面封装比较好,直接拿来用了)
  • 数据库 dbflow(目前最好用的安卓数据库,lib中未添加,具体用法可以看demo)
  • 通用adapter BaseRecyclerViewAdapterHelper
  • 圆角/圆形图片 roundimageview(支持圆角图片、圆形图片、椭圆图片)
  • 下拉刷新/上拉加载库 SmartRefreshLayout
  • 6.0动态权限申请 acp

一键生成MVP代码

下载项目中的FastMVP.zip解压到指定目录。

例如 C:\Program Files\Android\Android Studio1\plugins\android\lib\templates\activities

C:\Program Files\Android\Android Studio1是你的AS安装路径

加载图片:


一行代码简单调用

imageView.load(url)  

跳转Activity:


不带参数
warpActivity<OtherActivity>()  或者
warpActivityForResult<OtherActivity>(500)

传值
warpActivity<OtherActivity>("id" to 1,"name" to "姓名")  或者
warpActivityForResult<OtherActivity>(500,"id" to 1,"name" to "姓名")

OtherActivity获取参数

val id=intent.extras.getInt("id")
val name=intent.extras.getString("name")

Dialog:


一行代码简单调用

 showDialog("提示语")  或者
 showDialog("提示语",{ //确定按钮操作})

网络请求加载动画:


仿百度加载动画
 showLoading()
 stopLoading()

fastkotlin's People

Contributors

czh235285 avatar

Watchers

 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.