I have a Fragment
that has a FrameLayout
. This first fragment (A) loads inside its Framelayout another fragment (B). When I call getParentFra
The one thing that helped is, when creating adapter use getChildFragmentManager()
.
If you are not using adapter, just use getChildFragmentManager()
when doing transactions.
setTargetFragment()
is not recommended, since it gives errors on moveState()
of fragment(because fragments should be tied to FragmentManager)