title: Android Viewpager saving data and views
body: <p>Hopefully someone can help me with a slight problem/confusion I have with Viewpagers and saving data.</p>
  
  <p>PROBLEM:</p>
  
  <p>When scrolling across the four views I have,  the first view has two spinners, two textviews that display a string or a selected item. if I scroll on to the third page and back to the second page, the data in the first view is lost.  hense needing to save the data.</p>
  
  <p>Would this be done in the two routines stated below? (best guess is it would be) if so, what sort of commands need to be stated?</p>
  
  <p>CODE:</p>
  
  <pre><code>@Override   
  public void restoreState(Parcelable arg0, ClassLoader arg1) {       
  }
  
  @Override
  public Parcelable saveState() {
      return null;
  }
  </code></pre>
  
  <p>EXTRA INFO:
  the viewpager is being used in </p>
  
  <pre><code>public Object instantiateItem(View collection, int position) {
  }
  </code></pre>
  
  <p>The complete list of methods are as follows:</p>
  
  <pre><code>@Override
  public void destroyItem(View arg0, int arg1, Object arg2) {
      ((ViewPager) arg0).removeView((View) arg2);
  }
  
  @Override
  public boolean isViewFromObject(View arg0, Object arg1) {
      return arg0 == ((View) arg1);
  }
  
  @Override
  public Parcelable saveState() {
      return null;
  }
  
  @Override
  public void finishUpdate(View arg0) {
  }
  
  @Override
  public void restoreState(Parcelable arg0, ClassLoader arg1) {
  }
  
  @Override
  public void startUpdate(View arg0) {
  }
  </code></pre>