List of usage examples for android.animation ValueAnimator getCurrentPlayTime
public long getCurrentPlayTime()
From source file:Main.java
public static float getAnimatedFraction(ValueAnimator animator) { float fraction = ((float) animator.getCurrentPlayTime()) / animator.getDuration(); fraction = Math.min(fraction, 1f); fraction = animator.getInterpolator().getInterpolation(fraction); return fraction; }
From source file:Main.java
public static float getAnimatedFraction(ValueAnimator animator) { float fraction = animator.getDuration() > 0L ? (float) animator.getCurrentPlayTime() / (float) animator.getDuration() : 0.0F;/*from w w w. j av a 2 s . c o m*/ fraction = Math.min(fraction, 1.0F); fraction = animator.getInterpolator().getInterpolation(fraction); return fraction; }
From source file:Main.java
static float getAnimatedFraction(ValueAnimator animator) { float fraction = animator.getDuration() > 0L ? (float) animator.getCurrentPlayTime() / (float) animator.getDuration() : 0.0F;//w ww . j a v a 2 s.co m fraction = Math.min(fraction, 1.0F); fraction = animator.getInterpolator().getInterpolation(fraction); return fraction; }
From source file:Main.java
static float getAnimatedFraction(ValueAnimator animator) { float fraction = animator.getDuration() > 0 ? ((float) animator.getCurrentPlayTime()) / animator.getDuration() : 1f;//from www.j a v a 2 s . c o m fraction %= 1f; fraction = min(fraction, 1f); fraction = animator.getInterpolator().getInterpolation(fraction); return fraction; }
From source file:Main.java
static float getAnimatedFraction(ValueAnimator animator) { float fraction = animator.getDuration() > 0 ? ((float) animator.getCurrentPlayTime()) / animator.getDuration() : 0f;/*ww w.j a v a 2 s . c o m*/ fraction = min(fraction, 1f); fraction = animator.getInterpolator().getInterpolation(fraction); return fraction; }
From source file:Main.java
@TargetApi(Build.VERSION_CODES.HONEYCOMB) @SuppressLint("NewApi") static float getAnimatedFraction(ValueAnimator animator) { float fraction = animator.getDuration() > 0 ? ((float) animator.getCurrentPlayTime()) / animator.getDuration() : 0f;//from w ww . j a v a 2 s. c o m fraction = min(fraction, 1f); fraction = animator.getInterpolator().getInterpolation(fraction); return fraction; }
From source file:ch.berta.fabio.fabprogress.FabProgress.java
private float getAnimatedFraction(@NonNull ValueAnimator animator) { float fraction = ((float) animator.getCurrentPlayTime()) / animator.getDuration(); fraction = Math.min(fraction, 1f); fraction = animator.getInterpolator().getInterpolation(fraction); return fraction; }