Code example for FragmentStatePagerAdapter

Methods: destroyItem

0
	 */ 
	private Map<Integer, WeakReference<Fragment>> mFragments = new HashMap<Integer, WeakReference<Fragment>>();
 
	@Override 
	public void destroyItem(ViewGroup container, int position, Object object) {
		super.destroyItem(container, position, object);
 
		mFragments.remove(position);
	} 
 
	public MailDetailFragmentPagerAdapter(FragmentManager fm,
			List<Integer> mailIdMap) {
		super(fm);
 
		mMailIdMap = mailIdMap;
	} 
 
	@Override 
	public Fragment getItem(int position) {
		final int id = mMailIdMap.get(position);
		final Uri uri = ContentUris.withAppendedId(MailTable.ALL_MAILS_URI, id);