Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I use it from another fragment? #8

Open
naukellich opened this issue Nov 11, 2017 · 4 comments
Open

Can I use it from another fragment? #8

naukellich opened this issue Nov 11, 2017 · 4 comments

Comments

@naukellich
Copy link

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}

@kksingla
Copy link

same issue

@franmontiel
Copy link
Owner

Have you tried using the Activity's FragmentManager instead of the fragment one?

@danieldaeschle
Copy link

i can confirm, fragmentmanager and childfragmentmanager not working.

@iBunnyCobaya
Copy link

iBunnyCobaya commented 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants