导入依赖:
implementation 'com.squareup:otto:1.3.8'
1
定义一个类继承Bus,并且设置单列模式
注册和声明订阅者发送事件,最后解除注册与EventBus相同
EventBus与Otto的区别

Otto需要写一个类去继承Bus
Otto需要写单列模式
--------------------- 

相关文章:

  • 2022-12-23
  • 2021-06-18
  • 2022-02-18
  • 2022-12-23
  • 2021-10-26
  • 2021-08-12
  • 2021-11-28
  • 2021-11-28
猜你喜欢
  • 2021-06-23
  • 2021-05-28
  • 2021-11-28
  • 2022-12-23
  • 2021-06-02
  • 2021-12-06
  • 2022-01-15
相关资源
相似解决方案