com.nineoldandroids.animation.ObjectAnimator.isRunning()方法的使用及代码示例

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

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

ObjectAnimator.isRunning介绍

暂无

代码示例

代码示例来源:origin: NEYouFan/ht-refreshrecyclerview

@Override
public void onRefreshComplete() {
  if (animator != null && animator.isRunning()) {
    animator.cancel();
  }
}

代码示例来源:origin: NEYouFan/ht-refreshrecyclerview

@Override
public void onRefreshComplete() {
  if (animator != null && animator.isRunning()) {
    animator.cancel();
  }
}

代码示例来源:origin: NEYouFan/ht-refreshrecyclerview

@Override
public void onRefreshComplete() {
  if (animator != null && animator.isRunning()) {
    animator.cancel();
  }
}

代码示例来源:origin: NEYouFan/ht-refreshrecyclerview

@Override
public void onRefreshComplete() {
  if (animator != null && animator.isRunning()) {
    animator.cancel();
  }
}

代码示例来源:origin: canyinghao/CanEffect

@Override
  public void run() {
    if (ripple.isRunning()) {
      ripple.cancel();
    }
    isAnime = false;
    setRadius(0);
  }
}, 500);

代码示例来源:origin: canyinghao/CanEffect

private void stopAnime() {
  if (ripple != null && ripple.isRunning()) {
    postDelayed(new Runnable() {
      @Override
      public void run() {
        if (ripple.isRunning()) {
          ripple.cancel();
        }
        isAnime = false;
        setRadius(0);
      }
    }, 500);
  } else {
    isAnime = false;
    setRadius(0);
  }
}

代码示例来源:origin: Leaking/WeGit

@Override public void stop() {
  if (isRunning() && transformation.isRunning()) {
    transformation.end();
  } else {
    transformationRunning = false;
    invalidateSelf();
  }
}

代码示例来源:origin: agxxxx/AIDLMusicPlayer

public void pause() {
  if (!isPlaying) {
    return;
  }
  startNeedleAnimator();
  if (mDiscLayoutAnimator.isRunning() || mDiscLayoutAnimator.isStarted()) {
    mDiscLayoutAnimator.cancel();
  }
  isPlaying = false;
}

代码示例来源:origin: agxxxx/AIDLMusicPlayer

private void startNeedleAnimator() {
  if (isPlaying) {
    mNeedleAnimator = ObjectAnimator.ofFloat(mNeedle, "rotation", 0, NEEDLE_ROTATE_CIRCLE);
  } else {
    mNeedleAnimator = ObjectAnimator.ofFloat(mNeedle, "rotation", NEEDLE_ROTATE_CIRCLE, 0);
  }
  mNeedleAnimator.setDuration(NEEDLE_ANIMATOR_TIME);
  mNeedleAnimator.setInterpolator(new DecelerateInterpolator());
  if (mNeedleAnimator.isRunning() || mNeedleAnimator.isStarted()) {
    mNeedleAnimator.cancel();
  }
  mNeedleAnimator.start();
}

代码示例来源:origin: agxxxx/AIDLMusicPlayer

private void reverseDiscAnimator() {
  mDiscLayoutAnimator = ObjectAnimator.ofFloat(mDiscLayout, "rotation", mDiscLayoutAnimatorValue, 360);
  mDiscLayoutAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
    @Override
    public void onAnimationUpdate(ValueAnimator arg0) {
      mDiscLayoutAnimatorValue = (Float) arg0.getAnimatedValue();
    }
  });
  mDiscLayoutAnimator.setDuration(DISC_REVERSE_ANIMATOR_TIME);
  mDiscLayoutAnimator.setInterpolator(new AccelerateInterpolator());
  if (mDiscLayoutAnimator.isRunning() || mDiscLayoutAnimator.isStarted()) {
    mDiscLayoutAnimator.cancel();
  }
  mDiscLayoutAnimator.start();
}

代码示例来源:origin: agxxxx/AIDLMusicPlayer

private void startDiscAnimator(float animatedValue) {
  mDiscLayoutAnimator = ObjectAnimator.ofFloat(mDiscLayout, "rotation", animatedValue, 360 + animatedValue);
  mDiscLayoutAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
    @Override
    public void onAnimationUpdate(ValueAnimator arg0) {
      mDiscLayoutAnimatorValue = (Float) arg0.getAnimatedValue();
    }
  });
  mDiscLayoutAnimator.setDuration(DISC_ANIMATOR_TIME);
  mDiscLayoutAnimator.setRepeatCount(DISC_ANIMATOR_REPEAT_COUNT);
  mDiscLayoutAnimator.setInterpolator(new LinearInterpolator());
  if (mDiscLayoutAnimator.isRunning() || mDiscLayoutAnimator.isStarted()) {
    mDiscLayoutAnimator.cancel();
  }
  mDiscLayoutAnimator.start();
}

代码示例来源:origin: Leaking/WeGit

@Override public void start() {
  if (transformationRunning) return;
  if (animatingIconState != null && animatingIconState != currentIconState) {
    transformationRunning = true;
    final boolean direction = resolveTransformation();
    transformation.setFloatValues(
      direction ? TRANSFORMATION_START : TRANSFORMATION_MID,
      direction ? TRANSFORMATION_MID : TRANSFORMATION_END
    );
    transformation.start();
  }
  if (pressedCircle.isRunning()) {
    pressedCircle.cancel();
  }
  if (drawTouchCircle && !neverDrawTouch) {
    pressedCircle.setFloatValues(0, circleRadius * 1.22f);
    pressedCircle.start();
  }
  invalidateSelf();
}

代码示例来源:origin: NEYouFan/ht-refreshrecyclerview

@Override
public void onRefreshing() {
  mRefreshLoadView.setPivotX(0.5f * mRefreshLoadView.getMeasuredWidth());
  mRefreshLoadView.setPivotY(0.5f * mRefreshLoadView.getMeasuredHeight());
  if (animator == null) {
    animator = ObjectAnimator.ofFloat(mRefreshLoadView, "rotation", 0.0f, 360.0f);
    animator.setDuration(1000);
    animator.setRepeatCount(ValueAnimator.INFINITE);
    animator.setRepeatMode(ValueAnimator.RESTART);
  }
  if (animator.isRunning()) animator.cancel();
  animator.start();
}

代码示例来源:origin: NEYouFan/ht-refreshrecyclerview

@Override
public void onRefreshing() {
  mRefreshLoadView.setPivotX(0.5f * mRefreshLoadView.getMeasuredWidth());
  mRefreshLoadView.setPivotY(0.5f * mRefreshLoadView.getMeasuredHeight());
  if (animator == null) {
    animator = ObjectAnimator.ofFloat(mRefreshLoadView, "rotation", 0.0f, 360.0f);
    animator.setDuration(1000);
    animator.setRepeatCount(ValueAnimator.INFINITE);
    animator.setRepeatMode(ValueAnimator.RESTART);
  }
  if (animator.isRunning()) animator.cancel();
  animator.start();
}

代码示例来源:origin: NEYouFan/ht-refreshrecyclerview

@Override
public void onRefreshing() {
  mRefreshLoadView.setPivotX(0.5f * mRefreshLoadView.getMeasuredWidth());
  mRefreshLoadView.setPivotY(0.5f * mRefreshLoadView.getMeasuredHeight());
  if (animator == null) {
    animator = ObjectAnimator.ofFloat(mRefreshLoadView, "rotation", 0.0f, 360.0f);
    animator.setDuration(1000);
    animator.setRepeatCount(ValueAnimator.INFINITE);
    animator.setRepeatMode(ValueAnimator.RESTART);
  }
  if (animator.isRunning()) animator.cancel();
  animator.start();
}

代码示例来源:origin: NEYouFan/ht-refreshrecyclerview

@Override
public void onRefreshing() {
  mRefreshLoadView.setPivotX(0.5f * mRefreshLoadView.getMeasuredWidth());
  mRefreshLoadView.setPivotY(0.5f * mRefreshLoadView.getMeasuredHeight());
  if (animator == null) {
    animator = ObjectAnimator.ofFloat(mRefreshLoadView, "rotation", 0.0f, 360.0f);
    animator.setDuration(1000);
    animator.setRepeatCount(ValueAnimator.INFINITE);
    animator.setRepeatMode(ValueAnimator.RESTART);
  }
  if (animator.isRunning()) animator.cancel();
  animator.start();
}

相关文章