0

What I have

  1. I have a Activity MainActivity.java
  2. I have Added a Fragment FragmentA to MainActivity.java
  3. Then I Add another FragmentB to MainActivity.java
  4. Now When I pop the FragmentB I land Into FragmentA

What I am trying to know

  • I want to know which event in FragmentA is triggered
  • I want to trigger an event in FragmentA when I pop FragmentB
Devrath
  • 42,072
  • 54
  • 195
  • 297

1 Answers1

0

One way of doing this is to use RxBus library https://github.com/Anadea/RxBus. Use Rxbus.subscribe in FargmentA and RxBus.publish inside andother fragment

  • This is a valid solution since this can be achieved as proposed. But I ended up not using `RxJava` but a similar one called `EventBus` :) – Devrath Aug 20 '17 at 11:49
  • sure, dude (y) glad to help –  Aug 20 '17 at 12:06