Created
February 11, 2017 22:05
-
-
Save PierceZ/e34182bbf20badbf8d2aa1215f8c5cbf to your computer and use it in GitHub Desktop.
Example using the BusComponent.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Subscribe to a subject | |
App.getBusComponent().getTopSubject().subscribe((message) -> { | |
if (mMessageView != null) { | |
mMessageView.setText(message); | |
} | |
}); | |
//Send an item to subscribers of a subject | |
App.getBusComponent().getBottomSubject().onNext("Hello!"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment