简介:

EventBus是一个Android端优化的publish/subscribe消息总线,简化了应用程序内各组件间、组件与后台线程间的通信。比如请求网络,等网络返回时通过Handler或Broadcast通知UI,两个Fragment之间需要通过Listener通信,这些需求都可以通过EventBus实现。

EventBus3.0新手学习

下载地址

https://github.com/greenrobot/EventBus

使用步骤:

EventBus3.0新手学习

粘性事件:

EventBus3.0新手学习

本人提供一个简单的例程实现普通的EventBus事件和粘性事件的演示:

https://github.com/zhengwanshi/EventBus

相关文章:

  • 2022-12-23
  • 2021-12-08
  • 2022-12-23
  • 2021-11-29
  • 2021-04-30
  • 2021-08-08
  • 2021-09-17
  • 2021-08-17
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-07
  • 2021-10-20
  • 2022-01-02
  • 2021-11-19
  • 2021-10-14
相关资源
相似解决方案