title: Populating list with viewpager
body: <p>Im having a problem with populating a list with viewpager. The list is a recyclerview. When i slide to next page, the "getItem()" method is creating a new fragment of the list which the page will consist off. Im sending an int when creating the new fragment to let it know what to populate. My problem is that when i swipe to the first next page, its identical to the first page that loads with the app. The rest of the pages works as it should. I am unsure what the problem is and which part of the code is causing the problem.</p>
  
  <pre><code>private class ScreenSlidePagerAdapter extends FragmentPagerAdapter {
      public ScreenSlidePagerAdapter(FragmentManager fm) {
          super(fm);
      }
  
      @Override
      public Fragment getItem(int position) {
  
          Bundle args = new Bundle();
          args.putInt("mnd",pageMonth);
          System.out.println("Pagemonth: " + pageMonth);
          CourseListFragment cf = new CourseListFragment();
          cf.setArguments(args);
          return cf;
  }
  </code></pre>
  
  <p>Edit: this is how pageMonth changes for every page. currentMonth is just a variable that holds which month it is</p>
  
  <pre><code>@Override
          public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
  
              int mnd = position + currentMonth;
              if (mnd  &gt; 11)  mnd -= 12;
              pageMonth = mnd;
  </code></pre>
  
  <p>Edit: Just read that viewpager populates two pages at once at startup(one is loaded offscreen). I fixed this now with an if statement in the fragmentclass so it loads different for the first and second page.</p>