title: Android fragment OnCreateView called twice
body: <p>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.</p>
  
  <p>I have taken a look at the following questions and some more, but none of them contain answers for my case:</p>
  
  <p><a href="https://stackoverflow.com/questions/27723968/android-oncreateview-called-twice">Android oncreateview called twice</a></p>
  
  <p><a href="https://stackoverflow.com/questions/12201695/oncreateview-called-multiple-times-working-with-actionbar-and-fragments">OnCreateView called multiple times / Working with ActionBar and Fragments</a></p>
  
  <p><a href="https://stackoverflow.com/questions/10983396/fragment-oncreateview-and-onactivitycreated-called-twice">Fragment onCreateView and onActivityCreated called twice</a></p>
  
  <p>Most questions I found do not concern FragmentViewPagers, making them mostly unhelpful.</p>
  
  <p>I would be very grateful for any help!</p>