I have this nested fragment:
-> = host
MainActivity
-> Fragment A
-> Fragment B
-> Fragment C
but when i'm trying to getParentFragment()
from Fragment C
, i'm getting Fragment A
instead of Fragment B
. I will be very thankful if someone can explain this and show me the solution.
this is how i call getParentFragment from fragment C
FragmentB mContext = (FragmentB) getParentFragment();