コード例 #1
0
 private boolean canScrollToPreviousPage() {
   return mConfiguration.isRtl()
       ? getPreviousPageIndex() <= mConfiguration.firstPageIndex()
       : getPreviousPageIndex() >= mConfiguration.firstPageIndex();
 }
コード例 #2
0
 private int getPreviousPageIndex() {
   return mViewPager.getCurrentItem() + (mConfiguration.isRtl() ? 1 : -1);
 }
コード例 #3
0
 private boolean canScrollToNextPage() {
   return mConfiguration.isRtl()
       ? getNextPageIndex() >= mConfiguration.lastViewablePageIndex()
       : getNextPageIndex() <= mConfiguration.lastViewablePageIndex();
 }
コード例 #4
0
 private int getNextPageIndex() {
   return mViewPager.getCurrentItem() + (mConfiguration.isRtl() ? -1 : 1);
 }