Java tutorial
//package com.java2s; //License from project: Apache License import android.animation.ValueAnimator; import static java.lang.Math.min; public class Main { static float getAnimatedFraction(ValueAnimator animator) { float fraction = animator.getDuration() > 0 ? ((float) animator.getCurrentPlayTime()) / animator.getDuration() : 1f; fraction %= 1f; fraction = min(fraction, 1f); fraction = animator.getInterpolator().getInterpolation(fraction); return fraction; } }