All Projects → hyzhan43 → Ktarmor

hyzhan43 / Ktarmor

Licence: apache-2.0
👻 Android快速开发框架, KtArmor 寓意着 为Android 赋予战斗装甲, 方便开发者快速进行Android 开发。

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Ktarmor

Mentorship Android
Mentorship System is an application that matches women in tech to mentor each other, on career development, through 1:1 relations during a certain period of time. This is the Android application of this project.
Stars: ✭ 117 (+53.95%)
Mutual labels:  viewmodel, retrofit, livedata
RestaurantsExplorer
Android application build with MVVM Pattern, using Zomato API to enable search cities arround the world and display the city restaurants on a map.
Stars: ✭ 32 (-57.89%)
Mutual labels:  retrofit, viewmodel, livedata
Aachulk
️🔥️🔥️🔥AACHulk是以Google的ViewModel+DataBinding+LiveData+Lifecycles框架为基础, 结合Okhttp+Retrofit+BaseRecyclerViewAdapterHelper+SmartRefreshLayout+ARouter打造的一款快速MVVM开发框架
Stars: ✭ 109 (+43.42%)
Mutual labels:  viewmodel, retrofit, livedata
Sample Code Movies
This repository contains sample code. Its purpose being, to quickly demonstrate Android and software development in general, clean code, best practices, testing and all those other must know goodies.
Stars: ✭ 81 (+6.58%)
Mutual labels:  viewmodel, retrofit, livedata
WanAndroidJetpack
🔥 WanAndroid 客户端,Kotlin + MVVM + Jetpack + Retrofit + Glide。基于 MVVM 架构,用 Jetpack 实现,网络采用 Kotlin 的协程和 Retrofit 配合使用!精美的 UI,便捷突出的功能实现,欢迎下载体验!
Stars: ✭ 124 (+63.16%)
Mutual labels:  retrofit, viewmodel, livedata
KotlinEverywhere
This application created for Kotlin Everywhere series as a codelab. It will show step by step Kotlin and Android Jetpack Components fundamentals. 🚀🚀
Stars: ✭ 52 (-31.58%)
Mutual labels:  retrofit, viewmodel, livedata
Ktarmor Mvvm
👻 Android快速开发框架, KtArmor 寓意着 为Android 赋予战斗装甲, 方便开发者快速进行Android 开发。
Stars: ✭ 148 (+94.74%)
Mutual labels:  viewmodel, retrofit, livedata
Jetpackmvvm
🐔🏀一个Jetpack结合MVVM的快速开发框架,基于MVVM模式集成谷歌官方推荐的JetPack组件库:LiveData、ViewModel、Lifecycle、Navigation组件 使用Kotlin语言,添加大量拓展函数,简化代码 加入Retrofit网络请求,协程,帮你简化各种操作,让你快速开发项目
Stars: ✭ 1,100 (+1347.37%)
Mutual labels:  viewmodel, retrofit, livedata
ComposeMovie
Movie app that built with Jetpack Compose
Stars: ✭ 96 (+26.32%)
Mutual labels:  retrofit, viewmodel, livedata
Kriptofolio
Free open source minimalistic cryptocurrencies portfolio app for Android.
Stars: ✭ 79 (+3.95%)
Mutual labels:  retrofit, viewmodel, livedata
PlayAndroid
✌️✊👋玩安卓Mvvm组件化客户端,整合Jetpack组件DataBinding、ViewModel以及LiveData;屏幕适配✔️状态栏沉浸式✔️黑夜模式✔️,无数据、加载失败状态页;骨架屏、Koin依赖注入等
Stars: ✭ 193 (+153.95%)
Mutual labels:  retrofit, viewmodel, livedata
Tdcapp
Sample app which access the TDC (The Developer's Conference) REST API.
Stars: ✭ 55 (-27.63%)
Mutual labels:  viewmodel, retrofit, livedata
Retrokotlin
Simple Android app to show how unit testing with MockWebServer and Architecture Components (ViewModel + LiveData)
Stars: ✭ 55 (-27.63%)
Mutual labels:  viewmodel, livedata
Youtubedownloader
Android App for searching for videos on Youtube by keywords using YouTube Data API and download videos from YouTube in different formats.
Stars: ✭ 25 (-67.11%)
Mutual labels:  viewmodel, livedata
Moviefinderusingmvvm Android
🔥 MVVM + Clean Architecture + Best Practices | 🍿Movie Finder is a sample Android application 📱to search movies using OMDb API which is built to demonstrate use of Modern Android development tools - (Kotlin, Coroutines, Kodein, Architecture Components, MVVM, Retrofit, Gson, Material Components) 😊😊😉
Stars: ✭ 66 (-13.16%)
Mutual labels:  viewmodel, livedata
Kotlin Pokedex
🌀 A Pokedex app using ViewModel, LiveData, Room and Navigation
Stars: ✭ 1,156 (+1421.05%)
Mutual labels:  viewmodel, livedata
Base Mvvm
App built to showcase basic Android View components like ViewPager, RecyclerView(homogeneous and heterogeneous items), NavigationDrawer, Animated Vector Drawables, Collapsing Toolbar Layout etc. housed in a MVVM architecture
Stars: ✭ 18 (-76.32%)
Mutual labels:  viewmodel, livedata
Movie Zone
movies application using MVVM Architecture
Stars: ✭ 25 (-67.11%)
Mutual labels:  viewmodel, livedata
Githubprojectbrowser
This is a sample Android Project that is based on Clean Architecture
Stars: ✭ 64 (-15.79%)
Mutual labels:  viewmodel, livedata
Androidroom
Android example to show how to use Room to access SQLite database on device for reading and writing data. This example also shows how to use LiveData and ViewModel with Room to build reactive, well performing and easy to maintain applications.
Stars: ✭ 36 (-52.63%)
Mutual labels:  viewmodel, livedata

前言

学习了Kotlin有一段时间了, 每次写项目/Demo的时候, 总是用到网络请求MVPMVVM常用工具类通用自定义View, 索性把这些整合到一起, 搭成一个Android的脚手架——KtArmor.

什么是KtArmor ?

KtArmor 寓意着 为Android 赋予战斗装甲, 方便开发者快速进行Android 开发。节约开发者开发时间。为了满足开发者需求, 我整合了两个分支, 分别对应着 MVP, MVVM.

  • MVP
    • 架构模式: MVP + Kotlin
    • 网络请求: Retrofit + Okhttp + Coroutine
    • 功能:
    • 架构模式: MVP + Kotlin
    • 网络请求: Retrofit + Okhttp + Coroutine
    • 代码:简洁优雅, 易扩展
    • 文档: 有相关的KtArmor-MVP 系列文档说明
    • 插件:对应 KtArmor-MVP 模板代码生成插件
    • 功能:
      • 基本BaseActivityBaseFragmentToolbarActivity封装
      • MVP框架封装 MvpActivityMvpFragmentBasePresenterBaseModel封装
      • 网络请求封装 BaseOkHttpClientBaseRetrofitRetrofitFactory
      • 常用控件PlaceHolderView(占位布局)LoadingView(加载框)
      • 常用扩展封装(SharedPreferencesStartActivityLogToast(不重复显示))等
      • MVP代码模板(ActivityPresenterContractModel)生成插件
      • ....

MVP框架引入

先在 build.gradle(Project:XXXX) 的 repositories 添加:

allprojects {
    repositories {
        ...
        maven { url "https://jitpack.io" }
    }
}

然后在 build.gradle(Module:app) 的 dependencies 添加:

implementation 'com.github.hyzhan43:KtArmor:mvp-1.0.4'  // 根据github 引入最新版本即可

快速上手

在Application 中初始化KtArmor 框架。新建一个application 类, 如 BaseApplication, 在 BaseApplication 中, 调用KtArmor的 init 方法, 进行初始化, 参数如下:

  • 第一个参数是application,
  • 第二个参数是对应RetrofitConfig 配置。
class BaseApplication: Application(){

    override fun onCreate() {
        super.onCreate()

        // 初始化KtArmor
        KtArmor.init(this, MyRetrofitConfig())
    }
}

再新建一个 RetrofitConfig 配置类, 继承 BaseRetrofitConfig. 并复写 baseUrl 属性, 添加自己的 baseUrl。

class MyRetrofitConfig : BaseRetrofitConfig() {

    override val baseUrl: String
        get() = API.BASE_URL
}

这样你就创建好了一个拥有Kotlin + Retrofit + Okhttp + Coroutine项目了。然后就可以愉快编写自己的业务代码了(●'◡'●)

更多用法

Kotlin的魔能机甲——KtArmor (一)

Kotlin的魔能机甲——KtArmor插件篇(二)

Kotlin的魔能机甲——KtArmor(三)

Kotlin的魔能机甲——KtArmor网络调用封装(四)

未完待续

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].