¡@

Home 

2014/10/16 ¤W¤È 08:26:23

android Programming Glossary: this.getcurrentitem

Android: velocity-based ViewPager scrolling

http://stackoverflow.com/questions/12787287/android-velocity-based-viewpager-scrolling

distX final int width getWidth final int widthWithMargin width this.getPageMargin final float leftBound Math.max 0 this.getCurrentItem 1 widthWithMargin final float rightBound Math.min this.getCurrentItem 1 this.getAdapter .getCount 1 widthWithMargin if scrollX.. final float leftBound Math.max 0 this.getCurrentItem 1 widthWithMargin final float rightBound Math.min this.getCurrentItem 1 this.getAdapter .getCount 1 widthWithMargin if scrollX leftBound scrollX leftBound Now we know that we've hit the bound.. 1 widthWithMargin if scrollX leftBound scrollX leftBound Now we know that we've hit the bound flip the page if this.getCurrentItem 0 this.setCurrentItem this.getCurrentItem 1 false else if scrollX rightBound scrollX rightBound Now we know that we've..