I have an action, and it launches the DialogFragment dialog, at the end of the event, DialogFragment sends the event to the Otto event bus, this should trigger the parent method in it. I posted the related code here, the same code still works where it is in my application, but here the event simply does not fire.
Code in action ...
@Subscribe public void OttoUpdateUI(BudgetUpdateObject budgetUpdateObject) { updateUI(); Log.d("budget", "Otto updateUI called"); } @Override public void onResume() { super.onResume(); BusStand.getInstance().register(BudgetActivityNew.class); } @Override public void onPause() { super.onPause(); BusStand.getInstance().unregister(BudgetActivityNew.class); }
BusStand Class ....
public final class BusStand { private static final Bus BUS = new Bus(); public static Bus getInstance() { return BUS; } private void BusProvider() { } }
and shooting event ...
BusStand.getInstance().post(new BudgetUpdateObject());
I checked the import in this operation, and I do not use the dagger module, and I do not use any other event bus. Any help would be much appreciated.
So I start DialogFragment from activity ....
AddBudgetDialogFragment addBudgetDialogFragment = new AddBudgetDialogFragment(); addBudgetDialogFragment.setStyle(DialogFragment.STYLE_NO_TITLE,0); addBudgetDialogFragment.show(getSupportFragmentManager(),"DialogFragment");
source share