Skip to content
This repository has been archived by the owner on Apr 30, 2019. It is now read-only.

OnEvent not calling in navigationdrawer fragment #195

Closed
demo-Ashif opened this issue Oct 16, 2016 · 0 comments
Closed

OnEvent not calling in navigationdrawer fragment #195

demo-Ashif opened this issue Oct 16, 2016 · 0 comments

Comments

@demo-Ashif
Copy link

OnEvent method not calling from Navigation Drawer fragment though I have used eventbus in my other activity and fragments.

from Activity

EventBus.getDefault().post(new ProPicChangeEvent());

in fragment

@Override
public void onStart() {
    super.onStart();
    EventBus.getDefault().register(this);
}

@Override
public void onStop() {
    EventBus.getDefault().unregister(this);
    super.onStop();
}

@Subscribe(threadMode = ThreadMode.MAIN)
public void onProfilePicChangeEvent(ProPicChangeEvent event) {

    Glide.with(getActivity())
            .load(tinyDB.getString(ConstantPreference.KEY_PROFILE_PHOTO))
            .placeholder(R.drawable.image_placeholder).into(profileView);
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant