NavigationFragment icon indicating copy to clipboard operation
NavigationFragment copied to clipboard

Fragment is Visiblity gone when it go in pause mode

Open AmitPrajapati1902 opened this issue 8 years ago • 2 comments

I have try to open one dialog, when dialog is open fragment visibility is gone, why it happens ? once i will back from resume is work fine, but it reset all UI and Some Background task also.

Do you please help me to fix this isssue

AmitPrajapati1902 avatar Jun 29 '16 07:06 AmitPrajapati1902

For Example, i have perform to open action call or action send

AmitPrajapati1902 avatar Jul 07 '16 05:07 AmitPrajapati1902

@AmitPrajapati1902

This is a known issue since the library uses the child FragmentManager. At this point in time I'm not sure what will fix it as it seems to be a bug in the android system. Whenever a new activity is presented or finished, the child fragment manager seems to automatically remove it's fragments from the screen.

If you are making background tasks, I would advise making them as fragments off the main FragmentManager and not off a child FragmentManager. You can also save the screen state and restore it with a model in order to make the screen go back to it's original state.

Hope this is of help, there's nothing specific to my library that causes this. If you make a sample project that has a child fragment in a fragment and then call startActivity you'll notice the same behaviour. I'm not sure if it's a bug in the support library only or not though.

DMCApps avatar Jul 09 '16 13:07 DMCApps