ViewPager not showing correct View
<p>I'm using the V4 compatibility JAR.  I have a ViewPager that shows information about some bands.  When I create the PagerAdapter, I pass it an ArrayList of Band objects.</p>

<p>In the emulator, it always shows shows the 2nd band in the ArrayList's information first.  When I flip to the last view, the view always has no data.  When I flip back and forth, the data then gets really buggy.</p>

<p><strong>BandsActivity</strong></p>

<pre><code>private ViewPager mBandsPager;
private BandsPagerAdapter mBandsPagerAdapter;
private static final String TAG = "Paging";

@Override
public void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);
    setContentView(R.layout.awesomepager);

    // Build a couple bands;
    ArrayList&lt;Band&gt; bands = new ArrayList&lt;Band&gt;();
    bands.add(new Band(1, "Led Zeppelin"));
    bands.add(new Band(37, "Brand New"));
    bands.add(new Band(49, "Jay-Z"));

    mBandsPagerAdapter = new BandsPagerAdapter(this, bands);

    mBandsPager = (ViewPager) findViewById(R.id.awesomepager);
    mBandsPager.setAdapter(mBandsPagerAdapter);

}
</code></pre>

<p><strong>BandsPagerAdapter</strong></p>

<pre><code>private Context mCtx;
private ArrayList&lt;Band&gt; mBands;

public BandsPagerAdapter(Context ctx, ArrayList&lt;Band&gt; bands) {
    mCtx = ctx;
    mBands = bands;
}


@Override
public int getCount() {
    return mBands.size();
}

@Override
public Object instantiateItem(View collection, int position) {

    // Inflate and create the view
    LayoutInflater layoutInflater = (LayoutInflater)mCtx.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    View view = layoutInflater.inflate(R.layout.featured_bands_layout, null);

    // Build UI
    TextView name = (TextView)collection.findViewById(R.id.featured_band_name);

    // Populate UI with band data
    Band band = mBands.get(position);
    if(name != null) {
        name.setText("Name: " + band.getName() + ", Pos: " + position);
    }

    // Add View to the ViewPager collection
    ((ViewPager)collection).addView(view,0);

    return view;
}


@Override
public void destroyItem(View collection, int position, Object view) {

    ((ViewGroup) collection).removeView((View)view);
}

@Override
public boolean isViewFromObject(View view, Object object) {
    return view==((View)object);
}


@Override
public void finishUpdate(View arg0) {}


@Override
public void restoreState(Parcelable arg0, ClassLoader arg1) {}

@Override
public Parcelable saveState() {
    return null;
}

@Override
public void startUpdate(View arg0) {}
</code></pre>

<p>Any suggestions?  I saw a mention of implementing ViewPager.SimpleOnPageChangeListener, but didn't see how it could be used properly.</p>
