Code example for Interpolator

Methods: getInterpolation

0
        } else if (animStep == ANIM_SLIDE) {
            float fraction = (float) (timeDiff) / TIME_SLIDE;
            float x = mX;
            float y = mY;
            if (mAnimOrientation == 0 || mAnimOrientation == 180) {
                x = x + mDelta * mSlideInterpolator.getInterpolation(fraction);
            } else { 
                y = y + mDelta * mSlideInterpolator.getInterpolation(fraction);
            } 
            // float alpha = canvas.getAlpha(); 
            // canvas.setAlpha(fraction); 
            preview.directDraw(canvas, (int) mX, (int) mY,
                    mDrawWidth, mDrawHeight);
            // canvas.setAlpha(alpha); 
 
            review.draw(canvas, (int) x, (int) y, mDrawWidth, mDrawHeight);
        } else { 
            return false; 
        } 
        return true;