예제 #1
0
 @Override
 public void onClick(View view) {
   if (!mPagingEnabled) return;
   final TabView tabView = (TabView) view;
   if (mCurrentItem == tabView.getIndex()) {
     mAdapter.onPageReselected(mCurrentItem);
   }
   mCurrentItem = tabView.getIndex();
   mViewPager.setCurrentItem(mCurrentItem);
 }
 public void onClick(View view) {
   TabView tabView = (TabView) view;
   final int oldSelected = mViewPager.getCurrentItem();
   final int newSelected = tabView.getIndex();
   mViewPager.setCurrentItem(newSelected);
   if (oldSelected == newSelected && mTabReselectedListener != null) {
     mTabReselectedListener.onTabReselected(newSelected);
   }
 }