Open
Description
I have Main activity with BottomNavBar; In section 3 I have tab layout with 2 fragments; Is there any way to invoke this dialog fragment from fragment inside tab layout? Every time I try it shows error that
java.lang.IllegalArgumentException: No view found for id 0x1020002 (android:id/content) for fragment FullScreenDialogFragment{62f2ccc #0 id=0x1020002 dialog}
Activity
kksingla commentedon Nov 28, 2017
same issue
franmontiel commentedon Nov 28, 2017
Have you tried using the Activity's FragmentManager instead of the fragment one?
danieldaeschle commentedon Dec 14, 2017
i can confirm, fragmentmanager and childfragmentmanager not working.
iBunnyCobaya commentedon Jul 18, 2018
经过我的调查,错误的地方是在FullScreenDialogFragment类中,将show(FragmentTransaction transaction, String tag) 函数中的return transaction.add(android.R.id.content, this, tag).addToBackStack(null).commit();替换成return transaction.add(this, tag).addToBackStack(null).commit();就可以了,原因是因为getchildfragmentManager自己可以找到自己需要依附的跟view