1

I have the following model.

A TabFragment which extends Fragment.
A ListFragment which extends Fragment.
And a DetailFragment which extends Fragment.

TabFragment hosts ListFragment which will launch a DetailFragment.

When I call getActivity().setResult(Activity.RESULT_OK, i); from DetailFragment, onActivityResult is called, but only in TabFragment. I pass from Detail Fragment, one String identifier to TabFragment.

My only problem is that I would like to pass this String from TabFragment back up to ListFragment.

What is the best way to do this?

waylonion
  • 6,866
  • 8
  • 51
  • 92

1 Answers1

0

You can find a fragment you need with FragmentManager's findFragmentById() or findFragmentByTag() where id/tag is one you use whan you add a fragment. After that you can interact with this particular fragment.

sandkeks
  • 179
  • 1
  • 11