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

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

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

ObjectAnimator.isStarted介绍

暂无

代码示例

代码示例来源:origin: tyzlmjj/PagerBottomTabStrip

@Override
  public void onRepeat() {
    super.onRepeat();

    if (mAnimator == null){
      ObjectAnimator animator = ObjectAnimator.ofFloat(findViewById(R.id.icon),"Rotation",0f,-360f);
      animator.setDuration(375);
      mAnimator = animator;
    }

    if (!mAnimator.isStarted()){
      mAnimator.start();
    }

  }
}

代码示例来源:origin: recruit-lifestyle/FloatingView

/**
 * 削除アイコンの拡大・縮小アニメーションのキャンセル
 */
private void cancelScaleTrashAnimation() {
  // 枠内アニメーション
  if (mEnterScaleAnimator != null && mEnterScaleAnimator.isStarted()) {
    mEnterScaleAnimator.cancel();
  }
  // 枠外アニメーション
  if (mExitScaleAnimator != null && mExitScaleAnimator.isStarted()) {
    mExitScaleAnimator.cancel();
  }
}

代码示例来源:origin: Alex-Cin/Dialog

private void startSweepAnimation() {
  if (!sweepObjectAnimator.isStarted()) {
    //LogUtil.e("开始");
    sweepObjectAnimator.start();
  }
  if (!startAngleObjectAnimator.isStarted()) {
    startAngleObjectAnimator.start();
  }
}

代码示例来源:origin: rockon999/LeanbackLauncher

public void setAnimationEnabled(boolean enabled) {
  this.mAnimationEnabled = enabled;
  if (!enabled && this.mDimAnimation.isStarted()) {
    this.mDimAnimation.end();
  }
}

代码示例来源:origin: MoMoWait/LeanbackLauncher

public void setEnabled(boolean enabled) {
    this.mEnabled = enabled;
    if (!this.mEnabled && this.mFocusAnimation.isStarted()) {
      this.mFocusAnimation.end();
    }
  }
}

代码示例来源:origin: MoMoWait/LeanbackLauncher

public void setAnimationEnabled(boolean enabled) {
  this.mAnimationEnabled = enabled;
  if (!enabled && this.mDimAnimation.isStarted()) {
    this.mDimAnimation.end();
  }
}

代码示例来源:origin: JustinRoom/JSCKit

private void stopAnimation() {
    if (animator != null && animator.isStarted()) {
      animator.cancel();
      animator = null;
    }
  }
}

代码示例来源:origin: rockon999/LeanbackLauncher

public void setEnabled(boolean enabled) {
    this.mEnabled = enabled;
    if (!this.mEnabled && this.mFocusAnimation.isStarted()) {
      this.mFocusAnimation.end();
    }
  }
}

代码示例来源:origin: MoMoWait/LeanbackLauncher

public void setDimLevelImmediate(DimState dimState) {
  if (this.mDimAnimation.isStarted()) {
    this.mDimAnimation.cancel();
  }
  //setDimLevel(convertToDimLevel(dimState));
}

代码示例来源:origin: rockon999/LeanbackLauncher

public void setDimLevelImmediate(DimState dimState) {
  if (this.mDimAnimation.isStarted()) {
    this.mDimAnimation.cancel();
  }
  // setDimLevel(convertToDimLevel(dimState));
}

代码示例来源:origin: MoMoWait/LeanbackLauncher

private void animateKeyboardOrb(boolean visible) {
  if (this.mOrbAnimation != null) {
    if (this.mOrbAnimation.isStarted()) {
      this.mOrbAnimation.cancel();
    }
    if (this.mKeyboardOrbProgress != (visible ? 1.0f : 0.0f)) {
      this.mOrbAnimation.setFloatValues(new float[]{this.mKeyboardOrbProgress, visible ? 1.0f : 0.0f});
      this.mOrbAnimation.start();
    }
  }
}

代码示例来源:origin: rockon999/LeanbackLauncher

private void animateKeyboardOrb(boolean visible) {
  if (this.mOrbAnimation != null) {
    if (this.mOrbAnimation.isStarted()) {
      this.mOrbAnimation.cancel();
    }
    if (this.mKeyboardOrbProgress != (visible ? 1.0f : 0.0f)) {
      this.mOrbAnimation.setFloatValues(new float[]{this.mKeyboardOrbProgress, visible ? 1.0f : 0.0f});
      this.mOrbAnimation.start();
    }
  }
}

代码示例来源:origin: MoMoWait/LeanbackLauncher

public void setFocusImmediate(boolean focused) {
  if (this.mFocusAnimation.isStarted()) {
    this.mFocusAnimation.cancel();
  }
  setFocusProgress(focused ? 1.0f : 0.0f);
}

代码示例来源:origin: JustinRoom/CameraMaskDemo

public void stop() {
  scannerBar.setTranslationY(0);
  if (animator != null && animator.isStarted()) {
    animator.cancel();
    animator = null;
  }
}

代码示例来源:origin: rockon999/LeanbackLauncher

public void setFocusImmediate(boolean focused) {
  if (this.mFocusAnimation.isStarted()) {
    this.mFocusAnimation.cancel();
  }
  setFocusProgress(focused ? 1.0f : 0.0f);
  if (this.mListener != null) {
    this.mListener.onFocusLevelSettled(focused);
  }
}

代码示例来源:origin: rockon999/LeanbackLauncher

public void setAnimationsEnabled(boolean enabled) {
    this.mAnimationsEnabled = enabled;
    if (!(enabled || this.mMetaAnim == null || !this.mMetaAnim.isStarted())) {
      this.mMetaAnim.end();
    }
    this.mFocusAnimator.setEnabled(enabled);
    this.mDimmer.setAnimationEnabled(enabled);
  }
}

代码示例来源:origin: appwise-labs/NoInternetDialog

@Override
public void onWifiTurnedOn() {
  if (wifiAnimator != null && wifiAnimator.isStarted()) {
    wifiAnimator.cancel();
    wifiIndicator.setImageResource(R.drawable.ic_wifi);
    wifiIndicator.setAlpha(0.5f);
    isWifiOn = true;
    getContext().unregisterReceiver(wifiReceiver);
  }
}

代码示例来源:origin: MoMoWait/LeanbackLauncher

public void setAnimationsEnabled(boolean enabled) {
    this.mAnimationsEnabled = enabled;
    if (!(enabled || this.mMetaAnim == null || !this.mMetaAnim.isStarted())) {
      this.mMetaAnim.end();
    }
    this.mFocusAnimator.setEnabled(enabled);
    this.mDimmer.setAnimationEnabled(enabled);
  }
}

代码示例来源:origin: rockon999/LeanbackLauncher

public void animateFocus(boolean focused) {
  if (this.mEnabled) {
    if (this.mFocusAnimation.isStarted()) {
      this.mFocusAnimation.cancel();
    }
    if (getFocusProgress() != (focused ? 1.0f : 0.0f)) {
      this.mFocusAnimation.setFloatValues(new float[]{getFocusProgress(), focused ? 1.0f : 0.0f});
      this.mFocusAnimation.start();
      return;
    }
    return;
  }
  setFocusImmediate(focused);
}

代码示例来源:origin: luhaoaimama1/zone-sdk

@TargetApi(Build.VERSION_CODES.KITKAT)
  private void information() {
    log("information:--->getCurrentPlayTime:" + objAni.getCurrentPlayTime()
        + "\t getAnimatedValue:" + objAni.getAnimatedValue()
        + "\t getAnimatedFraction:" + objAni.getAnimatedFraction()
        + "\t isPaused:" + objAni.isPaused()
        + "\t isStart:" + objAni.isStarted()
        + "\t isRunning:" + objAni.isRunning()
    );
  }
}

相关文章