explanation: have 1 activity contains navigationdrawer.when activity launched.it's first open default fragment , fragment contains tablayout has multiple fragment.
when default fragment open tabs setup viewpager.assume, on first tab there 1 button. when click on button want call default fragment method
senario like
fragment of navigationdrawer(default fragment)->tablayout fragment(position=0)->button inside tablayout position=0->click on button it's call navigationdrawer(default fragment) method.
please me solve out problem.
there 3 solutions:
use
localbroadcastreceiver, send intent 1 fragment , listen @ anotheruse eventbus library
use activity callback listener. @ fragment can take current activity @
onattachmethod
Comments
Post a Comment