title: The application's PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDataSetChanged
body: <p>i want to call pager adapter in my view pager so below is my code</p>
  
  <pre><code>public class MyFragmentSimilarPagerAdapter extends FragmentPagerAdapter {
  
  ArrayList&lt;GetProductDetail.SimilarProductDetailData&gt; list;
  LinearLayout mLinearLayout;
  
  @Override
  public int getItemPosition(Object object) {
      return POSITION_NONE;
  }
  public MyFragmentSimilarPagerAdapter(FragmentManager fm, ArrayList&lt;GetProductDetail.SimilarProductDetailData&gt; list, LinearLayout mLinearLayout ) {
      super(fm);
      this.list=list;
      this.mLinearLayout=mLinearLayout;
  }
  
  
  @Override
  public Fragment getItem(int arg0) {
  
      MyFragment myFragment = new MyFragment(mLinearLayout);
      Bundle data = new Bundle();
      Log.d("PRID AT",list.get(arg0).getId());
      data.putString("prid", list.get(arg0).getSlug());
      myFragment.setArguments(data);
      return myFragment;
  }
  
  /** Returns the number of pages */
  
  @Override
  public int getCount() {
  
      return list.size();
  
  }
  
  @Override
  public CharSequence getPageTitle(int position) {
      return "Page #" + ( position + 1 );
     }
  
  }
  </code></pre>
  
  <p>Call this adapter form my activity classs</p>
  
  <pre><code>        FragmentManager fm = getSupportFragmentManager();
      mAdapter = new MyFragmentSimilarPagerAdapter(fm, Tags.mArrayListSimilarProduct,mLinearLayoutBottom);
      mViewPager.setAdapter(mAdapter);
  </code></pre>
  
  <p>when i run this code i get error like <strong>java.lang.IllegalStateException: The application's PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDataSetChanged</strong> any idea how can i solve this? your all suggestions are appreciable </p>
  
  <p>Logcat output</p>
  
  <pre><code>java.lang.IllegalStateException: The application's PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDataSetChanged! Expected adapter item count: 2, found: 3 Pager id: com.shopping.addtobuy:id/vpPager Pager class: class android.support.v4.view.ViewPager Problematic adapter: class adapter.MyFragmentSimilarPagerAdapter
   at android.support.v4.view.ViewPager.populate(ViewPager.java:999)
   at android.support.v4.view.ViewPager.populate(ViewPager.java:951)
   at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1473)
   at android.view.View.measure(View.java:15172)
   at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:617)
   at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:399)
   at android.view.View.measure(View.java:15172)
   at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4814)
   at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
   at android.support.v7.internal.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:124)
  at android.view.View.measure(View.java:15172)
  </code></pre>