DMCApps / NavigationFragment

The purpose of this manager is to work with the ViewPager, Tabs and Navigation drawer to handle a single stack flow of fragments on the screen. It makes use of a main Fragment as a container and presents and hides fragments within it as children.
MIT License
28 stars 8 forks source link

Fragment is Visiblity gone when it go in pause mode #24

Open AmitPrajapati1902 opened 8 years ago

AmitPrajapati1902 commented 8 years ago

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 commented 8 years ago

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

DMCApps commented 8 years ago

@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.