title: Does the specified child already have a parent?
body: <p><strong>Code:</strong></p>
  
  <pre><code>@Override
  public Object instantiateItem(View view, int position) {
  
      View myView = views.get(position);
      myView.invalidate();
  
      ((ViewPager) view).removeView(myView);
  
      ((ViewPager) view).addView(myView); //Causing Error
      return myView;
  }
  </code></pre>
  
  <p><strong>Error Log:</strong></p>
  
  <pre><code>com.testapp.main fatal error : The specified child already has a parent. 
  You must call removeView() on the child's parent first.
  java.lang.IllegalStateException: The specified child already has a parent. 
  You must call removeView() on the child's parent first.
  at android.view.ViewGroup.addViewInner(ViewGroup.java:3378)
  at android.view.ViewGroup.addView(ViewGroup.java:3249)
  at android.support.v4.view.ViewPager.addView(ViewPager.java:1243)
  at android.view.ViewGroup.addView(ViewGroup.java:3194)
  at android.view.ViewGroup.addView(ViewGroup.java:3170)
  </code></pre>
  
  <p>I called <code>removeView()</code> before adding the child view then why the error ?</p>