本文整理匯總了Java中android.animation.ValueAnimator.isRunning方法的典型用法代碼示例。如果您正苦於以下問題:Java ValueAnimator.isRunning方法的具體用法?Java ValueAnimator.isRunning怎麽用?Java ValueAnimator.isRunning使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類android.animation.ValueAnimator
的用法示例。
在下文中一共展示了ValueAnimator.isRunning方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: decelerate
import android.animation.ValueAnimator; //導入方法依賴的package包/類
public void decelerate() {
if (mAccelerateAnimator != null && mAccelerateAnimator.isRunning()) {
mAccelerateAnimator.cancel();
}
if (mFlushRate == FLUSH_RATE) return;
ValueAnimator animator = getDecelerateAnimator();
if (animator.isRunning()) animator.cancel();
long duration = (long) (((float) FLUSH_RATE - mFlushRate) / FLUSH_RATE * 1000);
if (duration == 0) {
mFlushRate = FLUSH_RATE;
return;
}
animator.setDuration(duration);
animator.setFloatValues(mFlushRate, FLUSH_RATE);
animator.start();
}
示例2: play
import android.animation.ValueAnimator; //導入方法依賴的package包/類
public void play() {
ValueAnimator animator = getAnimator();
if (animator.isRunning()) {
return;
}
animator.start();
}
示例3: isRunning
import android.animation.ValueAnimator; //導入方法依賴的package包/類
@Override
public boolean isRunning() {
for (ValueAnimator animator : mAnimators) {
return animator.isRunning();
}
return false;
}
示例4: accelerate
import android.animation.ValueAnimator; //導入方法依賴的package包/類
public void accelerate() {
if (mFlushRate == FLUSH_RATE_LIMITATION) return;
mFlushRate = FLUSH_RATE; // reset flush rate
ValueAnimator animator = getAccelerateAnimator();
if (animator.isRunning()) animator.cancel();
animator.setFloatValues(mFlushRate, FLUSH_RATE_LIMITATION);
animator.start();
}
示例5: isRunning
import android.animation.ValueAnimator; //導入方法依賴的package包/類
public static boolean isRunning(ValueAnimator animator) {
return animator != null && animator.isRunning();
}