PropertyValuesHolder.ofObject(SwitchDrawable.TOP_LEFT, null, getPathMotion().getPath( run.start.left + dx,
/** * ObjectAnimator: You can also create multiple animations by PropertyValuesHolder. * <p> * ValueAnimator has the same method, but we don't use it that way. #ValueAnimator.ofPropertyValuesHolder()# * * @return */ public Animator getObjectAnimatorByPropertyValuesHolder() { PropertyValuesHolder bgColorAnimator = PropertyValuesHolder.ofObject("backgroundColor", new ArgbEvaluator(), 0xff009688, 0xff795548); PropertyValuesHolder rotationXAnimator = PropertyValuesHolder.ofFloat("rotationX", 0f, 360f); ObjectAnimator objectAnimator = ObjectAnimator.ofPropertyValuesHolder(mPuppet, bgColorAnimator, rotationXAnimator); objectAnimator.setDuration(3000); objectAnimator.setRepeatCount(1); objectAnimator.setRepeatMode(ValueAnimator.REVERSE); return objectAnimator; }
BorderDrawable borderDrawable; if ((borderDrawable=WXViewUtils.getBorderDrawable(target))!=null) { holders.add(PropertyValuesHolder.ofObject( WXAnimationBean.Style.BACKGROUND_COLOR, new ArgbEvaluator(), borderDrawable.getColor(), WXResourceUtils.getColor(style.backgroundColor))); } else if (target.getBackground() instanceof ColorDrawable) { holders.add(PropertyValuesHolder.ofObject( WXAnimationBean.Style.BACKGROUND_COLOR, new ArgbEvaluator(), ((ColorDrawable) target.getBackground()).getColor(),
propertyValuesHolder = PropertyValuesHolder.ofObject(SwitchDrawable.TOP_LEFT, null, pathMotion.getPath( run.getStart().left, PointF startPoint = new PointF(run.getStart().left, run.getStart().top); PointF endPoint = new PointF(run.getEnd().left - dx, run.getEnd().top - dy); propertyValuesHolder = PropertyValuesHolder.ofObject(SwitchDrawable.TOP_LEFT, new TypeEvaluator<PointF>() { private final PointF point = new PointF();
/** * ObjectAnimator: You can also create multiple animations by PropertyValuesHolder. * <p> * ValueAnimator has the same method, but we don't use it that way. #ValueAnimator.ofPropertyValuesHolder()# * * @return */ public Animator getObjectAnimatorByPropertyValuesHolder() { PropertyValuesHolder bgColorAnimator = PropertyValuesHolder.ofObject("backgroundColor", new ArgbEvaluator(), 0xff009688, 0xff795548); PropertyValuesHolder rotationXAnimator = PropertyValuesHolder.ofFloat("rotationX", 0f, 360f); ObjectAnimator objectAnimator = ObjectAnimator.ofPropertyValuesHolder(mPuppet, bgColorAnimator, rotationXAnimator); objectAnimator.setDuration(3000); objectAnimator.setRepeatCount(1); objectAnimator.setRepeatMode(ValueAnimator.REVERSE); return objectAnimator; }
final ObjectAnimator animator; if (startData.textColor != endData.textColor) { final PropertyValuesHolder textColorProp = PropertyValuesHolder.ofObject("textColor", new ArgbEvaluator(), startData.textColor, endData.textColor); animator = ObjectAnimator.ofPropertyValuesHolder(drawable,
final ObjectAnimator animator; if (startData.textColor != endData.textColor) { final PropertyValuesHolder textColorProp = PropertyValuesHolder.ofObject("textColor", new ArgbEvaluator(), startData.textColor, endData.textColor); animator = ObjectAnimator.ofPropertyValuesHolder(drawable,