I created one action (DemoActivity.java) with two fragments (FragmentOne.java and FragmentTwo.java).
I registered an EventBus in an Activity like this EventBus.getDefault().register(this);
and created one Suscriber method in Activity:
@Subscriber public void abc(String str) { Log.i(TAG,"MainActivity Called !!"); }
Then I dispatch the event from FragmentTwo.java when I click the EventBus.getDefault().post(""); button EventBus.getDefault().post("");
This script is great for me. But when I create the same subscriber method in FragmentOne.java, it does not work. Why?
sanil
source share