FragmentStatePagerAdapter does not call fragments
I have FragmentStatePagerAdapter
a snippet with a pager. Inside the pager, I have two fragments to switch between them. What happens when I first came to the fragment, everything is done correctly, but when I go back and go back there again, then on the base fragment it is usually called onCreate
, onCreateView
etc., but on the fragments in the pager nothing is called, getItem
on the adapter it is not called, and the pager view is empty. On all the snippets I have setRetainInstance(true)
what is needed due to handling the rotation behavior.
Can you guys help me what to do about this?
source to share
No one has answered this question yet
Check out similar questions: