0

I have a main activity that have a navigation drawer in it which goes to many other fragments. One particular fragment A have 2 fragments (B & C) inside it.

Is it possible to have a fragment that acts like an activity which caters 2 other fragments inside it? (update: yes) If so, can the two child fragments interacts with each other? (e.g. passing data - a button click in fragment C populate a list (recycler view) in fragment B).

allanae
  • 145
  • 2
  • 12

1 Answers1

0

can the two child fragments interacts with each other? (e.g. passing data - a button click in fragment C populate a list (recycler view) in fragment B).

Yes, Use custom events and event handling for example. In that case you aren't really depend on particularly FragmentB.

Here is how to implement a custom event.

Community
  • 1
  • 1
matheszabi
  • 594
  • 5
  • 16