I have the fragment obj as well as the FrameLayout, I could also complete my logic if I can:
Get my fragments containerViewId
OR
See what FrameLayout a fragment is in?
I have the fragment obj as well as the FrameLayout, I could also complete my logic if I can:
Get my fragments containerViewId
OR
See what FrameLayout a fragment is in?
do this:
getSupportFragmentManager().findFragmentById(R.id.your_frame_layout);
it returns the fragment in frame layout
UPDATE
to get all fragments that you added in the frame layout (not all frame layouts):
FragmentManager mFragmentManager = getSupportFragmentManager();
mFragmentManager.beginTransaction().add(R.id.your_frame_layout, /*your Fragment*/).commit();
//get all fragments that you added to mFragmentManager
List<Fragment> fragmentList = mFragmentManager.getFragments();
(FrameLayout) fragment.getView().getParent()
give it a try. it may give you frame layout that fragment attached to.