Code example for ViewPager.OnPageChangeListener

Methods: getHeight, getPaddingBottom

0
        @Override 
        public void draw(Canvas canvas) {
                super.draw(canvas);
 
                // draw the bottom bar 
                final int bottomBarTop = getHeight() - getPaddingBottom()
                                - mBottomBarHeight;
                mCachedTabPaint.setAlpha(0xff);
                canvas.drawRect(0, bottomBarTop, getWidth(), bottomBarTop
                                + mBottomBarHeight, mCachedTabPaint);
        } 
 
        @Override 
        protected float getLeftFadingEdgeStrength() { 
                // forced so that we will always have the left fading edge 
                return 1.0f; 
        } 
 
        @Override 
        protected float getRightFadingEdgeStrength() { 
                // forced so that we will always have the right fading edge