1. 程式人生 > >pagerAdapter notifyDataSetChanged不重新整理頁面

pagerAdapter notifyDataSetChanged不重新整理頁面

轉載自:maoyu417
這裡只做記錄。
private int mChildCount = 0;

 @Override
 public void notifyDataSetChanged() {         
       mChildCount = getCount();
       super.notifyDataSetChanged();
 }

 @Override
 public int getItemPosition(Object object)   {          
       if ( mChildCount > 0) {
       mChildCount --;
       return POSITION_NONE;
       }
       return super.getItemPosition(object);
 }