dismiss is never called when navigate fragments

68 Views Asked by At

I am using Navigation. And let's say, I have A_fragment an B_Fragment.

A_fragment is the Home Fragment, and it has many dialogs when it shows up such as event or notice. And B_fragment, it can be directed by deeplink.

So, When I enter the app by deeplink, It will show A_fragment first and then B_fragment.

I'd like to dismiss all the dialogs of A_fragment when it navigate to B_fragment. However, onDismiss() nor onDestroyView() are not called. I expected the dialog lifecycle belongs to the fragment where the dialogs are created at first time, but it isn't.

How can I solve this problem?

0

There are 0 best solutions below