Create a gist now

Instantly share code, notes, and snippets.

Blog post snippet for implementing event bus
// note that it is important to subscribe to the exact same _rxBus instance that was used to post the events
_rxBus.toObserverable()
.subscribe(new Action1<Object>() {
@Override
public void call(Object event) {
if(event instanceof TapEvent) {
_showTapText();
}else if(event instanceof SomeOtherEvent) {
_doSomethingElse();
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment