Code example for PagerAdapter

Methods: setPrimaryItem

0
	} 
 
	@SuppressWarnings("deprecation") 
	@Override 
	public void setPrimaryItem(View container, int position, Object object) {
		super.setPrimaryItem(container, position, object);
	} 
 
	// 销毁position位置的界面 
	@Override 
	public void destroyItem(View view, int position, Object obj) {
		if(views!=null&&views.size()>0){
			PopupWindowPictureView v=views.get(position);
			ImageUtil.recycle(v);
			((ViewPager) view).removeView(v);
		} 
	} 
 
	// 获取当前窗体界面数 
	@Override 
Experience pair programming with AI  Get Codota for Java