Code example for LinearInterpolator

0
        } 
        float from = mLeftToRight ? 0f : 1f;
        float to = mLeftToRight ? 1f : 0f;
        mAnimator = ValueAnimator.ofFloat(from, to);
        mAnimator.setDuration(DURATION);
        mAnimator.setInterpolator(new LinearInterpolator());
        mAnimator.addListener(new AnimatorListenerAdapter() {
            @Override 
            public void onAnimationEnd(Animator animation) {
                mDrawDots = false;
                // make sure we draw one frame at the end with everything gone. 
                invalidate();
            } 
 
            @Override 
            public void onAnimationStart(Animator animation) {
                mDrawDots = true;
            } 
        }); 
        mAnimator.addUpdateListener(new AnimatorUpdateListener() {
            @Override