本文整理了Java中android.animation.ObjectAnimator.pause()
方法的一些代码示例,展示了ObjectAnimator.pause()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ObjectAnimator.pause()
方法的具体详情如下:
包路径:android.animation.ObjectAnimator
类名称:ObjectAnimator
方法名:pause
暂无
代码示例来源:origin: iammert/MaskProgressView
/**
* Pause Animation
*/
public void pause() {
mStatus = Status.PAUSED;
if (Build.VERSION.SDK_INT < 19)
objectAnimatorProgress.end();
else
objectAnimatorProgress.pause();
}
代码示例来源:origin: tyhjh/JinyunEffect
@Override
protected void onPause() {
super.onPause();
if (objectAnimator.isRunning()) {
objectAnimator.pause();
}
}
代码示例来源:origin: JustinRoom/CameraMaskDemo
public void pause() {
if (animator != null && animator.isRunning())
animator.pause();
}
代码示例来源:origin: google-ar/sceneform-android-sdk
@Override
public void onUpdate(FrameTime frameTime) {
super.onUpdate(frameTime);
// Animation hasn't been set up.
if (orbitAnimation == null) {
return;
}
// Check if we need to change the speed of rotation.
float speedMultiplier = getSpeedMultiplier();
// Nothing has changed. Continue rotating at the same speed.
if (lastSpeedMultiplier == speedMultiplier) {
return;
}
if (speedMultiplier == 0.0f) {
orbitAnimation.pause();
} else {
orbitAnimation.resume();
float animatedFraction = orbitAnimation.getAnimatedFraction();
orbitAnimation.setDuration(getAnimationDuration());
orbitAnimation.setCurrentFraction(animatedFraction);
}
lastSpeedMultiplier = speedMultiplier;
}
代码示例来源:origin: luhaoaimama1/zone-sdk
case R.id.bt_pause:
if (!objAni.isPaused())
objAni.pause();
break;
case R.id.bt_resume:
内容来源于网络,如有侵权,请联系作者删除!