viewPager.setOnPageChangeListener(new ViewPager.OnPageChangeListener() { int selectedIndex = 0; boolean fireRead; @Override public void onPageScrolled(int i, float v, int i2) { if(fireRead && i==Images.length-2){ Log.i("","event fire cancel "); fireRead=false; }else if(fireRead && i==Images.length-1){ Log.i("","event fire"); fireRead=false; //do something } } @Override public void onPageSelected(int i) { selectedIndex = i; } @Override public void onPageScrollStateChanged(int i) { if (selectedIndex == Images.length-1 && i == 1) { Log.i("","event fire read "); fireRead = true; } } });