how to get current item no in viewpager.
@Override
public Object instantiateItem(ViewGroup paramView, int paramInt) {
int itemno1= getItem(pager.getCurrentItem());
int itemno2= getItem(paramInt);
Toast.makeText(context, "postition"+itemno1, Toast.LENGTH_SHORT).show();
//Toast.makeText(context, "postition"+itemno2, Toast.LENGTH_SHORT).show();
}
but this methods are not working properly.when ever i swipe front and back it gives the wrong item no..