Ejemplo n.º 1
0
 @Override
 public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
   if (mUserOnPageChangeListener != null) {
     mUserOnPageChangeListener.onPageScrolled(
         position, positionOffset, positionOffsetPixels);
   }
 }
 public void onPageScrolled(int paramInt1, float paramFloat, int paramInt2) {
   h = paramInt1;
   j = paramFloat;
   invalidate();
   if (g != null) {
     g.onPageScrolled(paramInt1, paramFloat, paramInt2);
   }
 }
  public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
    mCurrentPage = position;
    mPageOffset = positionOffset;
    invalidate();

    if (mListener != null) {
      mListener.onPageScrolled(position, positionOffset, positionOffsetPixels);
    }
  }
Ejemplo n.º 4
0
  @Override
  public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
    mCurrentPage = position;
    mPositionOffset = positionOffset;
    if (mFades) {
      if (positionOffsetPixels > 0) {
        removeCallbacks(mFadeRunnable);
        mPaint.setAlpha(0xFF);
      } else if (mScrollState != ViewPager.SCROLL_STATE_DRAGGING) {
        postDelayed(mFadeRunnable, mFadeDelay);
      }
    }
    invalidate();

    if (mListener != null) {
      mListener.onPageScrolled(position, positionOffset, positionOffsetPixels);
    }
  }
Ejemplo n.º 5
0
  @Override
  public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
    if (mListener != null) mListener.onPageScrolled(position, positionOffset, positionOffsetPixels);

    CheckedTextView tv_scroll = getTabView(position);
    CheckedTextView tv_next = getTabView(position + 1);

    if (tv_scroll != null && tv_next != null) {
      int width_scroll = tv_scroll.getWidth();
      int width_next = tv_next.getWidth();
      float distance = (width_scroll + width_next) / 2f;

      int width = (int) (width_scroll + (width_next - width_scroll) * positionOffset + 0.5f);
      int offset =
          (int)
              (tv_scroll.getLeft()
                  + width_scroll / 2f
                  + distance * positionOffset
                  - width / 2f
                  + 0.5f);
      updateIndicator(offset, width);
    }
  }
 @Override
 public void onPageScrolled(int arg0, float arg1, int arg2) {
   if (mListener != null) {
     mListener.onPageScrolled(arg0, arg1, arg2);
   }
 }