Source code analysis of EventBus
usage method
The use method is very simple, according to Official documents The introduction is divided into three steps.
Step 1: define events
public static class MessageEvent { }
Step 2: prepare subscribers
Define subscription methods to handle received events.
@Subscribe(threadMode = ThreadMode.MAIN)
public void onMessageEvent(Messa ...
Posted by jvalarta on Sat, 06 Nov 2021 05:17:21 +0100
EventBus usage and source code analysis of Android system
1. Introduction to eventbus
EventBus is a publish / subscribe event bus framework used in Android development. Based on the observer mode, it separates the receiver and sender of events, simplifies the communication between components, especially the communication between fragments, and can avoid many inconveniences caused by broadcast communi ...
Posted by blueman378 on Tue, 21 Sep 2021 06:54:43 +0200