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?

+3
android fragment


source to share


No one has answered this question yet

Check out similar questions:

937
findViewById in fragment
823
onActivityResult is not called on fragment
462
ViewPager and Fragments - What's the correct way to store the state of a Fragment?
308
What is the difference between FragmentPagerAdapter and FragmentStatePagerAdapter?
261
Understanding the setRetainInstance (boolean) snippet
173
Fragment onResume () & onPause () is not called on the stack
47
After pivoting, onCreate () of the Fragment is called before onCreate () of FragmentActivity
1
How to get fragments of FragmentStatePagerAdapter ViewPager in android
0
White screen in the field of view of the pager pager when we return?
-1
FragmentStatePagerAdapter not updating



All Articles
Loading...
X
Show
Funny
Dev
Pics