建立頁面UI元件
public Object instantiateItem(View container, int position)
delete頁面UI元件
public void destroyItem(View arg0, int arg1, Object arg2)
更新ViewPager
ex:
ImageAdapter adapter = (ImageAdapter)viewPager.getAdapter();
viewPager.setAdapter (null);
viewPager.setCurrentItem(newIndex);
viewPager.setAdapter (adapter);
沒有留言:
張貼留言