Giter Site home page Giter Site logo

xdroidmvp's Introduction

#XDroidMvp 轻量级的Android MVP快速开发框架

概述

XDroidMvpXDroidAndroid快速开发框架的MVP版本,其使用方式类似于XDroid,大部分源码也来自XDroid

XDroidMvp主要会有这些特性:

新增:

无需写Contract! 无需写Present接口! 无需写View接口!

  • Mvp实现
  • RxJava & RxAndroid
  • 权限适配 RxPermission
  • 事件订阅默认采用 RxBus
  • 网络交互:
    • Retrofit + rx
    • Https
    • 统一异常处理
    • 缓存
    • 。。。。

保留:

  • 提供XActivityXFragmentSimpleRecAdapterSimpleListAdapter等基类,可快速进行开发
  • 完整封装XRecyclerView,可实现绝大部分需求
  • QTContentLayoutXRecyclerContentLayout实现loading、error、empty、content四种状态的自由切换
  • 实现了MemoryDiskSharedPreferences三种方式的缓存,可自由扩展
  • 内置了EventBus,可自由切换到其他事件订阅库
  • 内置Glide,可自由切换其他图片加载库
  • 可输出漂亮的Log,支持JsonXmlThrowable等,蝇量级实现
  • 内置链式路由
  • 内置常用工具类:packagerandomfile...,提供的都是非常常用的方法
  • 内置加密工具类 XCodec,你想要的加密姿势都有

先睹为快

你可以这么使用:

MainActivity

public class MainActivity extends XActivity<VMain> {

    @Override
    public void initData(Bundle savedInstanceState) {
        getV().test();      //p调用v的方法
    }

    public void test() {
        getpDelegate().toastShort("v 调用 p");
    }

    @Override
    public VMain newV() {
        return new VMain();
    }
}

VMain

public class VMain extends XView<MainActivity> {

    @BindView(R.id.tv_showMvp)
    TextView tvShowMvp;


    @Override
    public void bindEvent() {
        tvShowMvp.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                getP().test();      //v 调用 p的方法
            }
        });
    }


    public void test() {
        getvDelegate().toastShort("p 调用 v的方法");
    }


    @Override
    public int getLayoutId() {
        return R.layout.activity_main;
    }

}

更新日志

  • 2016-12-23,新增mvp、base、cache、event、imageloader、log、router
  • 2016-12-25,新增rxJava、rxAndroid、rxlifecycle、rxpermission、rxbus、net(retrofit)
  • 2016-12-26,新增网络异常统一处理

TODO

  • rx
  • retrofit
  • rxpermission
  • rxbus
  • cache
  • wiki
  • demo

About Me

Email : [email protected]

XDroid交流群:153569290

XDroid MVC版本XDroid

xdroidmvp's People

Contributors

limedroid 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.