Skip to content

Can I use it from another fragment? #8

Open
@naukellich

Description

@naukellich

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

kksingla commented on Nov 28, 2017

@kksingla

same issue

franmontiel

franmontiel commented on Nov 28, 2017

@franmontiel
Owner

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

danieldaeschle

danieldaeschle commented on Dec 14, 2017

@danieldaeschle

i can confirm, fragmentmanager and childfragmentmanager not working.

iBunnyCobaya

iBunnyCobaya commented on Jul 18, 2018

@iBunnyCobaya

经过我的调查,错误的地方是在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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

      Participants

      @franmontiel@kksingla@iBunnyCobaya@naukellich@danieldaeschle

      Issue actions

        Can I use it from another fragment? · Issue #8 · franmontiel/FullScreenDialog