I have many nested fragments.
- Activity A
- MainFragment (in a FrameLayout)
- Fragment A (in a FrameLayout in MainFragment)
- Fragment B (in a FrameLayout in MainFragment)
- Fragment C (in a ViewPager in Fragment B)
- Fragment D (in a ViewPager in Fragment B) <--- this is where I want to catch onActivityResult
- MainFragment (in a FrameLayout)
This is how I start activity for result:
startActivityForResult(Intent.createChooser(intent, "Title"), FILE_PICK);
I don't have onActivityResult
overriden anywhere else. I tried to call it in Activity A and it got called, but then even though I called super, it never came to Fragment D. Also tried to call onActivityResult
in MainFragment
and it never gets called there either.
getChildFragmentManager()
as its nested fragment – Klehm