android.animation.ObjectAnimator.pause()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(147)

本文整理了Java中android.animation.ObjectAnimator.pause()方法的一些代码示例,展示了ObjectAnimator.pause()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ObjectAnimator.pause()方法的具体详情如下:
包路径:android.animation.ObjectAnimator
类名称:ObjectAnimator
方法名:pause

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:

相关文章