Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.animation.ValueAnimator;

public class Main {
    public static float getAnimatedFraction(ValueAnimator animator) {
        float fraction = animator.getDuration() > 0L
                ? (float) animator.getCurrentPlayTime() / (float) animator.getDuration()
                : 0.0F;
        fraction = Math.min(fraction, 1.0F);
        fraction = animator.getInterpolator().getInterpolation(fraction);
        return fraction;
    }
}