Android View Remove removeCurItem(MenuItem item, int idx, ViewPager vp)

Here you can find the source of removeCurItem(MenuItem item, int idx, ViewPager vp)

Description

remove Cur Item

Declaration

public static void removeCurItem(MenuItem item, int idx, ViewPager vp) 

Method Source Code

//package com.java2s;

import android.support.v4.view.ViewPager;

import android.view.MenuItem;

public class Main {
    public static void removeCurItem(MenuItem item, int idx, ViewPager vp) {
        for (int i = 0; i < vp.getAdapter().getCount(); i++) {
            if (item.getItemId() == idx + i + 1) {
                vp.setCurrentItem(i);/* w  w  w.  java 2  s. co  m*/
            }
        }
    }
}

Related

  1. removeFromParent(View child)
  2. removeHardwareAccelerationSupport(View v)
  3. removeSelfFromParent(View v)