You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was testing the sample app, and I had put breakpoints in on onCreateView, onViewCreated (and all other Fragment lifecycle methods). Much to my disappointment, all Fragments were being created every time I navigated between different Fragments using BottomNav.
I thought the very point of this library is to avoid re-creating Fragments, please correct me if I am wrong. I would appreciate any help with this ([email protected])
Is it because -
Fragment fragment = mFragmentManager.findFragmentByTag(tag); always returns null in method "changeFragment()". ??
The text was updated successfully, but these errors were encountered:
Yes, the point of the library is to avoid recreating Fragments and to keep the view states of each fragments.
From what I've tested the fragments are only recreated when the Activity is rotated. This is unavoidable from what I've tested so far. However if you have an improvement or an idea to solve this, please send a PR.
I was testing the sample app, and I had put breakpoints in on onCreateView, onViewCreated (and all other Fragment lifecycle methods). Much to my disappointment, all Fragments were being created every time I navigated between different Fragments using BottomNav.
I thought the very point of this library is to avoid re-creating Fragments, please correct me if I am wrong. I would appreciate any help with this ([email protected])
Is it because -
Fragment fragment = mFragmentManager.findFragmentByTag(tag); always returns null in method "changeFragment()". ??
The text was updated successfully, but these errors were encountered: