Git Product home page Git Product logo

mvprxretrofit's Introduction

MvpRxRetrofit(Star me after you read this page pleases)

Android项目框架,使用MVP解耦,使用Rxjava链式调用访问网络,其他业务处理也可以用Rx,使用Retrofit网络请求以及数据缓存

使用方法以及详解,接下来更新,其实代码里面注释写得很清楚,不过,我后面再完善吧 架构还需要封装更多的东西,但是这需要针对具体项目进行封装

*MVP + RxJava2 + Retrofit2 + Glide

简介

美图,天气查询应用

  • Android一些次新的技术的一个合集示例
  • API来自网络免费API
  • MVP模式(使用ViewDelegate解耦,非常感谢kymjs提供的mvp**,在他的基础上我有一些改动,希望能在这个应用上做个最佳实践)@kymjs(https://github.com/kymjs/TheMVP)
  • leakcanary的使用
  • Retrofit(+RxJava)网络请求
  • Glide加载缓存图片(瀑布流卡片显示)

版本

  • 修改百度API为易源官方API(仅修改了新闻)
  • 修复“最新新闻”模块没有数据的问题
  • 抽取出一个公共的recyclerview代理类(grid,list合二为一),并支持下拉刷新
  • 天气预报查询,弹窗提醒
  • 修改新闻列表为cardview展示
  • 支持新闻查看详情,CollapsingToolbarLayout + NestedScrollView + ToorBarLayout
  • 支持右滑返回 d- 增加离线缓存机制(使用Retrofit和Okhttp实现网络缓存)
  • 崩溃捕捉并写入本地文件(有存储卡写到存储卡,没有保存到内存),基于此功能可以后期做一个友好的应用crash提示
  • 整体框架搭建完毕,新闻列表功能已经实现,各功能正常
  • 下拉刷新与加载更多的解耦

截图

新闻相亲

天气预报

新闻列表

深受以下文章影响,感谢大神们的无私讲解dd

开源项目

RengwuxianRxjava

扔物线《给Android开发者的RxJava详解》文章中的例子
Github地址:https://github.com/androidmalin/RengwuxianRxjava

新闻客户端

基于Material Design和MVP的新闻客户端
Github地址:https://github.com/liuling07/SimpleNews

About me

引入的第三方库

squarup出品,必属精品, 不用过多介绍

Rx系列

其他热门

  • Glide(Google官方推荐图片加载库)
  • Butter Knife(专注于控件的注解,Dagger太全面)
  • Logger(打印log现在可以好看多了,使用so easy)
  • Material(一系列meterial的控件,不过用起来有点差强人意,wiki写得不是很全面)
  • SwipeBackLayout(从未想过右滑返回可以做得这么简单,非常强大!)
  • PhotoView(支持旋转的photoview,不过没发现有设置单击图片的回调,直接设置OnclickListener不行,chrisbanes/PhotoView提供onPhotoTapListener是可以的o)

打算研究Material设计的Android实现了,之后会发布相应版本,shangchuangithub

mvprxretrofit's People

Watchers

James Cloos avatar LukeMi 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.