Giter Site home page Giter Site logo

livedatabus's Introduction

LiveDataBus

利用LivaData来实现的数据传递的简单例子,可用来替换EventBus,该例子实现较为简单,容易理解其原理,有以下优点

LiveDataBus优点

LiveDataBus优点 解释
LiveDataBus的实现极其简单 相比EventBus复杂的实现,LiveDataBus只需要一个类就可以实现
LivaDataBus可以减小apk包的大小 LiveDataBus只依赖Android官方组件LiveData,本身只一个类。EventBus 57Kb,RxJava 2.2M
LiveDataBus依赖方支持更好 LiveDataBus只依赖Android官方组件LiveData,相比RxBus依赖的RxJava和RxAndroid,依赖方支持更好
LiveDataBus具有生命周期感知 LiveDataBus具有生命周期感知,在Android系统中使用调用者不需要调用凡注册,相比EventBus和RxBus使用更为方便,并且没有内存泄漏风险

入门文档

更完善的成熟用法

LiveEventBus

livedatabus's People

Stargazers

 avatar  avatar  avatar

Watchers

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