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
How can we prevent to lose the current status of the fragment?
I add more details: I'm building an app that has a tinder-like UI with cards. If user scrolls the cards deck, then change fragment, when it comes back the deck is re-load. I need to maintain the position, aka restore view status
The text was updated successfully, but these errors were encountered:
Hi,
I'm not using wiewpager, i just run your samplecode. I'm facing the same problem. In your sample code, onCreateView is called everytime but listviews does not recreated. I don't know why listview not recreate but others views that i added are recreates. (I added a textView with random number that i generate in onCreateview. And textview's text changed every time)
When switching tabs, fragments are replaced, and the previous fragment putted into backstack with saved state. If you switch back, the fragment is recreated and restores its own state from the saved state.
How can we prevent to lose the current status of the fragment?
I add more details: I'm building an app that has a tinder-like UI with cards. If user scrolls the cards deck, then change fragment, when it comes back the deck is re-load. I need to maintain the position, aka restore view status
The text was updated successfully, but these errors were encountered: