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

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

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

ObjectAnimator.setObjectValues介绍

暂无

代码示例

代码示例来源:origin: qiujuer/Genius-Android

private void animateShowTitle(boolean show) {
  TitleProperty pStart = getStartProperty(show);
  TitleProperty pEnd = getEndProperty(show);
  ObjectAnimator animator = getTitleAnimator();
  animator.setObjectValues(pStart, pEnd);
  if (isAttachWindow()) {
    animator.start();
  } else {
    setTitleProperty(pEnd);
  }
}

代码示例来源:origin: 799536960/switchView

private void setAnimView(ObjectAnimator anim, Object... values) {
  anim.setObjectValues(values);
  anim.setEvaluator(new ColorEvaluator());
}

代码示例来源:origin: shellljx/FuckingVolumeSlider

private void startUpAnimator() {
  mDrawRipple = false;
  mHasup = true;
  mPressAnimator.cancel();
  if (mListener != null) {
    mListener.result((int) (100 * Math.abs(mDegree) / 45));
  }
  initBallPoints();
  mDegreeAnimator.setFloatValues(mDegree, 0);
  mBallAnimator.setObjectValues(mBallStart, mBallEnd);
  mBallAnimator.setInterpolator(new AccelerateInterpolator());
  mBallAnimator.setEvaluator(new PathEvaluator(mBallControll));
  mUpAnimator.setDuration(100 + (int) (100 * getDegreeFraction()));
  mUpAnimator.start();
}

代码示例来源:origin: google-ar/sceneform-android-sdk

/** Returns an ObjectAnimator that makes this node rotate. */
 private static ObjectAnimator createAnimator() {
  // Node's setLocalRotation method accepts Quaternions as parameters.
  // First, set up orientations that will animate a circle.
  Quaternion orientation1 = Quaternion.axisAngle(new Vector3(0.0f, 1.0f, 0.0f), 0);
  Quaternion orientation2 = Quaternion.axisAngle(new Vector3(0.0f, 1.0f, 0.0f), 120);
  Quaternion orientation3 = Quaternion.axisAngle(new Vector3(0.0f, 1.0f, 0.0f), 240);
  Quaternion orientation4 = Quaternion.axisAngle(new Vector3(0.0f, 1.0f, 0.0f), 360);

  ObjectAnimator orbitAnimation = new ObjectAnimator();
  orbitAnimation.setObjectValues(orientation1, orientation2, orientation3, orientation4);

  // Next, give it the localRotation property.
  orbitAnimation.setPropertyName("localRotation");

  // Use Sceneform's QuaternionEvaluator.
  orbitAnimation.setEvaluator(new QuaternionEvaluator());

  //  Allow orbitAnimation to repeat forever
  orbitAnimation.setRepeatCount(ObjectAnimator.INFINITE);
  orbitAnimation.setRepeatMode(ObjectAnimator.RESTART);
  orbitAnimation.setInterpolator(new LinearInterpolator());
  orbitAnimation.setAutoCancel(true);

  return orbitAnimation;
 }
}

相关文章