111

给EventBus发的消息加个id来区分

 6 years ago
source link: https://juejin.im/post/5a17a8bef265da433227420e
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
背景在小型的项目当中,接入EventBus不失为一种好的解耦方式,同时也很好的避免了多余的接口代码的编写,发送方只管将消息发出,而不用去管对应消息类型的接收方怎么处理。 然而,在使用过程中,也难免遇上了一些不好用的特性。 EventBus可以通过@Subscr

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK