Code example for FragmentStatePagerAdapter

Methods: destroyItem

0
        return fragment;
    } 
 
    @Override 
    public void destroyItem(ViewGroup container, int position, Object object) {
        super.destroyItem(container, position, object);
        WeakReference<Fragment> weakFragment = mWeakFragmentMap.get(position);
        if (weakFragment != null) {
            weakFragment.clear();
        } 
    } 
 
    @Override 
    public int getCount() { 
        return mHolderList.size();
    } 
 
    @Override 
    public void onPageScrollStateChanged(int arg0) {
        // Ignore 
    }