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

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

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

ObjectAnimator.setFloatValues介绍

暂无

代码示例

代码示例来源: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

mRotateAnim.setFloatValues(0);
mRotateAnim.end();
mRotateAnim = null;
mRotateAnim.cancel();
float valueAvatar = (float) mRotateAnim.getAnimatedValue();
mRotateAnim.setFloatValues(valueAvatar, 360f + valueAvatar);

代码示例来源:origin: aa112901/remusic

mRotateAnim.cancel();
float valueAvatar = (float) mRotateAnim.getAnimatedValue();
mRotateAnim.setFloatValues(valueAvatar, 360f + valueAvatar);

代码示例来源:origin: lovejjfg/Circle

@Override
  public void onAnimationRepeat(Animator animation) {
    mObjectAnimatorAngle.setFloatValues(360f);
  }
});

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

@Override
  public void onAnimationEnd(Animator animation) {
    super.onAnimationEnd(animation);
    ghostXAnimatorReverse.setFloatValues(GHOST_X_ANIMATION_VALUE * direction, 1f);
    ghostSetReverse.start();
  }
});

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

@Override
  public void onAnimationEnd(Animator animation) {
    super.onAnimationEnd(animation);
    direction = animateDirection();
    ghostXAnimator.setFloatValues(1f, GHOST_X_ANIMATION_VALUE * direction);
    ghostSet.start();
  }
});

代码示例来源:origin: com.albedinsky.android/ui-controller

/**
 */
@Override
void scaleIndicatorArrowDown() {
  INDICATOR_ARROW_SCALE_ANIMATOR.setFloatValues(1, 0);
  INDICATOR_ARROW_SCALE_ANIMATOR.setDuration(indicatorArrowScaleDuration);
  INDICATOR_ARROW_SCALE_ANIMATOR.start();
}

代码示例来源:origin: com.albedinsky.android/ui-controller

/**
 */
@Override
void hideIndicator(float pullPosition) {
  INDICATOR_PULL_POSITION_ANIMATOR.setFloatValues(pullPosition, 0);
  INDICATOR_PULL_POSITION_ANIMATOR.setDuration(indicatorHideDuration);
  INDICATOR_PULL_POSITION_ANIMATOR.start();
  controller.updatePrivateFlags(PFLAG_RUNNING_SCHEDULED_ANIMATION, true);
}

代码示例来源:origin: com.albedinsky.android/ui-widget-picker

/**
 */
@Override
boolean onConcealDiscreteComponents() {
  if (transformation == 0) return false;
  discreteComponentsAnimator.setFloatValues(transformation, 0f);
  discreteComponentsAnimator.setStartDelay(0);
  discreteComponentsAnimator.start();
  return true;
}

代码示例来源:origin: mime-mob/AndroidAdvanceAnimation

public PropertyAnimator values(float ...values) {
  checkObj();
  animator.setFloatValues(values);
  return this;
}

代码示例来源:origin: lovejjfg/Circle

@Override
  public void onAnimationEnd(Animator animation) {
    offsetAnimator.cancel();
    offsetAnimator.setDuration(200);
    offsetAnimator.setFloatValues(defaultY, defaultY + amplitude, defaultY);
    offsetAnimator.start();
    distanceUpAnimator.start();
  }
});

代码示例来源:origin: com.albedinsky.android/ui

/**
 */
@Override
void popIndicator() {
  controller.updatePrivateFlags(PFLAG_POPPING_INDICATOR, true);
  INDICATOR_POP_DISMISS_ANIMATOR.setFloatValues(0, 1);
  INDICATOR_POP_DISMISS_ANIMATOR.setDuration(indicatorPopDuration);
  INDICATOR_POP_DISMISS_ANIMATOR.start();
}

代码示例来源:origin: com.albedinsky.android/ui

/**
 */
@Override
void dismissIndicator() {
  controller.updatePrivateFlags(PFLAG_DISMISSING_INDICATOR, true);
  INDICATOR_POP_DISMISS_ANIMATOR.setFloatValues(1, 0);
  INDICATOR_POP_DISMISS_ANIMATOR.setDuration(indicatorDismissDuration);
  INDICATOR_POP_DISMISS_ANIMATOR.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: TakuSemba/CropMe

@Override
public void move(float delta) {
  View target = (View) animator.getTarget();
  if (target != null) {
    cancel();
    animator.setInterpolator(null);
    animator.setDuration(0);
    animator.setFloatValues(target.getTranslationY() + delta);
    animator.start();
  }
}

代码示例来源:origin: TakuSemba/CropMe

@Override
public void move(float delta) {
  View target = (View) animator.getTarget();
  if (target != null) {
    cancel();
    animator.setInterpolator(null);
    animator.setDuration(0);
    animator.setFloatValues(target.getTranslationX() + delta);
    animator.start();
  }
}

代码示例来源:origin: hujiaweibujidao/yava

private void startAnimator1() {
    ObjectAnimator animator1 = new ObjectAnimator();
    animator1.setTarget(textView1);
    animator1.setPropertyName("translationY");
    animator1.setFloatValues(0f, -100f);
    animator1.setDuration(1000);
    animator1.setInterpolator(new LinearInterpolator());
    animator1.setEvaluator(EasingFunction.BOUNCE_OUT);
    animator1.start();
  }
}

代码示例来源:origin: hujiaweibujidao/yava

private void startAnimator2() {
  ObjectAnimator animator2 = new ObjectAnimator();
  animator2.setTarget(textView2);
  animator2.setPropertyName("translationY");
  animator2.setFloatValues(0f, -100f);
  animator2.setDuration(1000);
  animator2.setInterpolator(EasingFunction.BOUNCE_OUT);
  animator2.setEvaluator(new FloatEvaluator());
  animator2.start();
}

代码示例来源:origin: fookwood/Launcher3

public static ObjectAnimator ofFloat(View target, String propertyName, float... values) {
  ObjectAnimator anim = new ObjectAnimator();
  anim.setTarget(target);
  anim.setPropertyName(propertyName);
  anim.setFloatValues(values);
  cancelOnDestroyActivity(anim);
  new FirstFrameAnimatorHelper(anim, target);
  return anim;
}

代码示例来源:origin: com.github.japgolly.android.test/robolectric

@Implementation
public static ObjectAnimator ofFloat(Object target, String propertyName, float... values) {
  ObjectAnimator result = new ObjectAnimator();
  result.setTarget(target);
  result.setPropertyName(propertyName);
  result.setFloatValues(values);
  RobolectricShadowOfLevel16.shadowOf(result).setAnimationType(float.class);
  return result;
}

相关文章