本文整理了Java中android.animation.ObjectAnimator.isRunning()
方法的一些代码示例,展示了ObjectAnimator.isRunning()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ObjectAnimator.isRunning()
方法的具体详情如下:
包路径:android.animation.ObjectAnimator
类名称:ObjectAnimator
方法名:isRunning
暂无
代码示例来源:origin: aa112901/remusic
public boolean getAnimateState() {
return mObjectAnimator.isRunning();
}
代码示例来源:origin: aa112901/remusic
public void startRotation() {
if (mObjectAnimator != null) {
if (!mObjectAnimator.isRunning()) {
mObjectAnimator.start();
}
} else {
initRotateAnimation(0f);
mObjectAnimator.start();
}
}
代码示例来源:origin: android-cjj/Android-MaterialRefreshLayout
/**
* 开启转圈圈
*
* @param v
*/
public void startSunLineAnim(View v) {
if (mAnimator == null) {
mAnimator = ObjectAnimator.ofFloat(v, "rotation", 0f, 720f);
mAnimator.setDuration(7 * 1000);
mAnimator.setInterpolator(new LinearInterpolator());
mAnimator.setRepeatCount(ValueAnimator.INFINITE);
}
if (!mAnimator.isRunning())
mAnimator.start();
}
代码示例来源:origin: iMeiji/Toutiao
@Override
public void onNestedPreScroll(CoordinatorLayout coordinatorLayout, View child, View target, int dx, int dy, int[] consumed) {
if (dy > 0) {// 上滑隐藏
if (outAnimator == null) {
outAnimator = ObjectAnimator.ofFloat(child, "translationY", 0, child.getHeight());
outAnimator.setDuration(200);
}
if (!outAnimator.isRunning() && child.getTranslationY() <= 0) {
outAnimator.start();
}
} else if (dy < 0) {// 下滑显示
if (inAnimator == null) {
inAnimator = ObjectAnimator.ofFloat(child, "translationY", child.getHeight(), 0);
inAnimator.setDuration(200);
}
if (!inAnimator.isRunning() && child.getTranslationY() >= child.getHeight()) {
inAnimator.start();
}
}
}
}
代码示例来源:origin: aa112901/remusic
public void stopRotation() {
if (mObjectAnimator != null) {
if (mObjectAnimator.isRunning()) {
mObjectAnimator.cancel();
}
float valueAvatar = (float) mObjectAnimator.getAnimatedValue();
v = valueAvatar;
mObjectAnimator.setFloatValues(valueAvatar, 360f + valueAvatar);
} else {
initRotateAnimation(0f);
}
}
代码示例来源:origin: aa112901/remusic
if (MusicPlayer.isPlaying()) {
mRotateAnim = (ObjectAnimator) view.getTag(R.id.tag_animator);
if (mRotateAnim != null && !mRotateAnim.isRunning() && mNeedleAnim != null) {
mAnimatorSet = new AnimatorSet();
mAnimatorSet.play(mNeedleAnim).before(mRotateAnim);
代码示例来源:origin: aa112901/remusic
mProgress.postDelayed(mUpdateProgress, 200);
mControl.setImageResource(R.drawable.play_rdi_btn_pause);
if (mAnimatorSet != null && mRotateAnim != null && !mRotateAnim.isRunning()) {
if (mRotateAnim != null && mRotateAnim.isRunning()) {
mRotateAnim.cancel();
float valueAvatar = (float) mRotateAnim.getAnimatedValue();
代码示例来源:origin: wangdan/AisenWeiBo
mDownX = downX;
if (mAnimator != null && mAnimator.isRunning()) {
mAnimator.end();
代码示例来源:origin: wooplr/Spotlight
public void playAnim(List<AnimPoint> animPoints) {
if (animPoints != null) {
mAnimPoints = animPoints;
}
if (mLineAnim == null) {
mLineAnim = getLineAnim();
}
if (mLineAnim.isRunning()) {
mLineAnim.cancel();
}
mLineAnim.start();
}
代码示例来源:origin: badoualy/stepper-indicator
boolean inLineAnimation = lineAnimator != null && lineAnimator.isRunning();
boolean inIndicatorAnimation = indicatorAnimator != null && indicatorAnimator.isRunning();
boolean inCheckAnimation = checkAnimator != null && checkAnimator.isRunning();
代码示例来源:origin: google/android-ui-toolkit-demos
runningInfo.oldTextRotator.isRunning();
prevAnimPlayTime = firstHalf ?
runningInfo.oldTextRotator.getCurrentPlayTime() :
代码示例来源:origin: com.albedinsky.android/ui-controller-pull
/**
*/
@Override
boolean isRunning() {
return PULL_ANIMATOR.isRunning();
}
代码示例来源:origin: com.albedinsky.android/ui-controller
/**
*/
@Override
boolean isPopDismissIndicatorAnimationRunning() {
return INDICATOR_POP_DISMISS_ANIMATOR.isRunning();
}
代码示例来源:origin: com.albedinsky.android/ui
/**
*/
@Override
boolean isRunning() {
return PULL_ANIMATOR.isRunning();
}
代码示例来源:origin: com.albedinsky.android/ui
/**
*/
@Override
boolean isPopDismissIndicatorAnimationRunning() {
return INDICATOR_POP_DISMISS_ANIMATOR.isRunning();
}
代码示例来源:origin: HpWens/MeiWidgetView
private void endAnimation() {
if (null != mBackOrExitAnimator && mBackOrExitAnimator.isRunning()) {
mBackOrExitAnimator.cancel();
}
}
代码示例来源:origin: tyhjh/JinyunEffect
@Override
protected void onPause() {
super.onPause();
if (objectAnimator.isRunning()) {
objectAnimator.pause();
}
}
代码示例来源:origin: gumingwei/WellSwipe
public void setCheckedImmediately(boolean checked) {
super.setChecked(checked);
if (mProcessAnimator != null && mProcessAnimator.isRunning()) {
mProcessAnimator.cancel();
}
setProcess(checked ? 1 : 0);
invalidate();
}
代码示例来源:origin: tiandawu/IotXmpp
public void setCheckedImmediately(boolean checked) {
super.setChecked(checked);
if (mProcessAnimator != null && mProcessAnimator.isRunning()) {
mProcessAnimator.cancel();
}
setProcess(checked ? 1 : 0);
invalidate();
}
代码示例来源: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()
);
}
}
内容来源于网络,如有侵权,请联系作者删除!