Code Monkey home page Code Monkey logo

wanandroidappkotlinmvvm's Introduction

Kotlin+Flow+协程+Jetpack+MVVM架构实现的WanAndroid客户端的开发搭建

简介

采用 Kotlin 语言编写,采用MVVM架构,结合ViewMdel、Lifecycle、paging、LiveData、navigation、Room等Jetpack组件以及Retrofit使用。 API是采用的鸿神开放玩 Android API 本项目的大部分资源文件和部分代码以及ui效果都是参照WanAndroid站内的开源WanAndroid项目, 因为本项目只是为了展示Kotlin+Jetpack+MVVM的开发 架构,并不是再造一个完整的WanAndroid客户端。

如果这个项目对你学习有帮助或有参考价值,麻烦给个 StarFork 哈,谢谢~

主要涉及的技术要点

使用Flow+Retrofit实现Http的链式请求

封装基类:BaseVMActivity、BaseVMFragment、BaseViewModel、BasePagingSource、BasePagingDataAdapter、BaseRvAdapter,BaseLifecycleDialog

使用反射实现ViewBinding和ViewModel的模板式绑定

初始化ViewModel时将其和Activity的生命周期绑定

通过新的setMaxLifecycle方法实现Fragment的懒加载

最低兼容版本:23

主要使用的开源框架

感谢所有优秀的开源项目

wanandroidappkotlinmvvm's People

Contributors

jeremyzwc avatar jzqisan 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.