コード例 #1
0
 /*
  * (non-Javadoc)
  *
  * @see android.support.v4.view.ViewPager#onSizeChanged(int, int, int, int)
  */
 @Override
 protected void onSizeChanged(int w, int h, int oldw, int oldh) {
   super.onSizeChanged(w, h, oldw, oldh);
   if (mOnSizeChange != null) {
     mOnSizeChange.onSizeChanged(w, h, oldw, oldh);
   }
 }
コード例 #2
0
 @Override
 protected void onSizeChanged(int w, int h, int oldw, int oldh) {
   super.onSizeChanged(w, h, oldw, oldh);
   mPageWidth = getWidth();
   if (mPageWidth != 0) {
     mCurrentPageEdgeScrollX = (getCurrentItem() - mInitItem) * getWidth();
   }
 }
コード例 #3
0
 @Override
 protected void onSizeChanged(int w, int h, int oldw, int oldh) {
   super.onSizeChanged(w, h, oldw, oldh);
   // Schedule a new measurement pass as the dimensions have changed
   mNeedsMeasurePage = true;
 }