PagerAdapter setPrimaryItem - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for PagerAdapter setPrimaryItem method.

This code example shows how to use the following methods:setPrimaryItem
	 
	@Override 
	public void setPrimaryItem(View container, int position, Object object) {
		// TODO Auto-generated method stub 
		 
		super.setPrimaryItem(container, position, object);
	} 
	@Override 
	public void destroyItem(View container, int position, Object object) {
		((ViewPager) container).removeView(mListViews.get(position));
	} 
	@Override 
	public void finishUpdate(View container) {
		// TODO Auto-generated method stub 
		super.finishUpdate(container);
	} 
	@Override 
	public void startUpdate(View container) {
		// TODO Auto-generated method stub 
		super.startUpdate(container);
5
CodeRank
This code example shows how to use the following methods:setPrimaryItem
	 
	@Override 
	public void setPrimaryItem(View container, int position, Object object) {
		// TODO Auto-generated method stub 
		 
		super.setPrimaryItem(container, position, object);
	} 
	@Override 
	public void destroyItem(View container, int position, Object object) {
		((ViewPager) container).removeView(mListViews.get(position));
	} 
	@Override 
	public void finishUpdate(View container) {
		// TODO Auto-generated method stub 
		super.finishUpdate(container);
	} 
	@Override 
	public void startUpdate(View container) {
		// TODO Auto-generated method stub 
		super.startUpdate(container);
5
CodeRank
This code example shows how to use the following methods:setPrimaryItem
		} 
 
		@Override 
		public void setPrimaryItem(View container, int position, Object object) {
			// TODO Auto-generated method stub 
			super.setPrimaryItem(container, position, object);
		} 
 
		@Override 
		public void startUpdate(View container) {
			// TODO Auto-generated method stub 
			super.startUpdate(container);
		} 
	} 
	 // 指引页面更改事件监听器 
    class JshopActivityNGoodsViewPagerChangeListener implements OnPageChangeListener {   
 
    	public JshopActivityNGoodsViewPagerChangeListener(){ 
		 
    	} 
5
CodeRank
This code example shows how to use the following methods:setPrimaryItem
	} 
	 
	@Override 
	public void setPrimaryItem(ViewGroup container, int position, Object object) {
		// TODO Auto-generated method stub 
		super.setPrimaryItem(container, position, object);
		View view = (View)object;
		view.setScaleX(1);
		view.setScaleY(1);
		view.setAlpha(1f);
	} 
} 
4
CodeRank
This code example shows how to use the following methods:setPrimaryItem
	public void destroyItem(View arg0, int arg1, Object arg2) {
		((ViewPager)arg0).removeView((View)arg2);
	} 
	@Override 
	public void setPrimaryItem(ViewGroup container, int position, Object object){
		super.setPrimaryItem(container, position, object);
		  ViewPager pager = (ViewPager) container;
		  int width = 0;
		  switch(position){
		  case 0: 
			  width = 195;
			  break; 
		  case 1: 
			  width = 380;
			  break; 
		  case 2: 
			  width = 200;
			  break; 
		  case 3: 
			  width= 190;
4
CodeRank
This code example shows how to use the following methods:setPrimaryItem
		 
		@Override 
		public void setPrimaryItem(View container, int position, Object object) {
			// TODO Auto-generated method stub 
			//getGoodsDetail(goodslists,position); 
			super.setPrimaryItem(container, position, object);
		} 
		@Override 
		public void destroyItem(View container, int position, Object object) {
			((ViewPager) container).removeView(container);
		} 
		@Override 
		public void finishUpdate(View container) {
			// TODO Auto-generated method stub 
			super.finishUpdate(container);
		} 
		@Override 
		public void startUpdate(View container) {
			// TODO Auto-generated method stub 
			super.startUpdate(container);
3
CodeRank
This code example shows how to use the following methods:setPrimaryItem
	} 
 
	@Override 
	public void setPrimaryItem(ViewGroup container, int position, Object object) {
		// TODO Auto-generated method stub 
		super.setPrimaryItem(container, position, object);
	} 
 
	@Override 
	public void startUpdate(View container) {
		// TODO Auto-generated method stub 
		super.startUpdate(container);
	} 
 
	@Override 
	public void startUpdate(ViewGroup container) {
		// TODO Auto-generated method stub 
		super.startUpdate(container);
	} 
	 
4
CodeRank
This code example shows how to use the following methods:setPrimaryItem
	 
	@Override 
	public void setPrimaryItem(View container, int position, Object object) {
		// TODO Auto-generated method stub 
		 
		super.setPrimaryItem(container, position, object);
	} 
	@Override 
	public void destroyItem(View container, int position, Object object) {
		((ViewPager) container).removeView(mListViews.get(position));
	} 
	@Override 
	public void finishUpdate(View container) {
		// TODO Auto-generated method stub 
		super.finishUpdate(container);
	} 
	@Override 
	public void startUpdate(View container) {
		// TODO Auto-generated method stub 
		super.startUpdate(container);
4
CodeRank
This code example shows how to use the following methods:setPrimaryItem
        this.mContext = context;
    } 
 
    @Override 
    public void setPrimaryItem(ViewGroup container, int position, Object object) {
        super.setPrimaryItem(container, position, object);
        ((GalleryViewPager)container).mCurrentView = ((UrlTouchImageView)object).getImageView();
    } 
 
    @Override 
    public Object instantiateItem(View collection, int position){
        UrlTouchImageView iv = new UrlTouchImageView(mContext);
//        iv.setUrl(mResources.get(position)); 
        iv.setUrlAndThumbnail(mResources.get(position), "/mnt/sdcard/tgram/image/text_small.png");
        iv.setLayoutParams(new Gallery.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT));
        ((ViewPager) collection).addView(iv, 0);
        return iv;
    } 
 
    @Override 
4
CodeRank
This code example shows how to use the following methods:setPrimaryItem
	 * (non-Javadoc) 
	 * @see android.support.v4.view.PagerAdapter#setPrimaryItem(android.view.ViewGroup, int, java.lang.Object) 
	 */ 
	@Override 
	public void setPrimaryItem(ViewGroup container, int position, Object object) {
		super.setPrimaryItem(container, position, object);
		 
		parent.onPageChanged(container, position);
	} 
	 
	/* 
	 * (non-Javadoc) 
	 * @see android.support.v4.view.PagerAdapter#getCount() 
	 */ 
	@Override 
	public int getCount() { 
		return image.length;
	} 
	 
	/* 
4
CodeRank
This code example shows how to use the following methods:setPrimaryItem
	} 
 
	@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 
4
CodeRank
This code example shows how to use the following methods:setPrimaryItem
	} 
 
	@Override 
	public void setPrimaryItem(ViewGroup container, int position, Object object) {
		// TODO Auto-generated method stub 
		super.setPrimaryItem(container, position, object);
	} 
} 
4
CodeRank
This code example shows how to use the following methods:setPrimaryItem
	} 
 
	@Override 
	public void setPrimaryItem(ViewGroup container, int position, Object object) {
		Log.d("Svendbug", "@@@@@@@@@@@@@@@@@   setPrimaryItem : " + position);
		super.setPrimaryItem(container, position, object);
	} 
 
	@Override 
	public boolean isViewFromObject(View view, Object object) {
		return view == (object);
	} 
 
	@Override 
	public void restoreState(Parcelable arg0, ClassLoader arg1) {
 
	} 
 
	@Override 
	public Parcelable saveState() {
4
CodeRank
This code example shows how to use the following methods:setPrimaryItem
		return mListViews.get(position);
	} 
 
	@Override 
	public void setPrimaryItem(ViewGroup container, int position, Object object) {
		super.setPrimaryItem(container, position, object);
	} 
 
	@Override 
	public boolean isViewFromObject(View view, Object object) {
		return view == (object);
	} 
 
	@Override 
	public void restoreState(Parcelable arg0, ClassLoader arg1) {
 
	} 
 
	@Override 
	public Parcelable saveState() {
4
CodeRank
setPrimaryItem Method Overview
This method is deprecated. Use setPrimaryItem(ViewGroup, int, Object)
See Code Examples for other Android PagerAdapter Methods: