I am using a FragmentPagerAdapter with fragments. My problem is that when I call setCurrentItem, the OnCreateView method of the fragment that is being loaded is called twice. It is important to note however that the fragment is not recreated, it is simply resumed. I am desperate to find a solution that causes OnCreateView to only be called once.
I have taken a look at the following questions and some more, but none of them contain answers for my case:
Android oncreateview called twice
OnCreateView called multiple times / Working with ActionBar and Fragments
Fragment onCreateView and onActivityCreated called twice
Most questions I found do not concern FragmentViewPagers, making them mostly unhelpful.
I would be very grateful for any help!