由于这个错误,Eclipse 不会让我编译我的项目:
The method playTogether(Animator...) in the type AnimatorSet is not applicable for the arguments (ObjectAnimator, ObjectAnimator, ObjectAnimator)
这是说明问题的代码片段:
AnimatorSet s = new AnimatorSet();
//IMPORTED NINEOLDANDROID LIBRARY TO HANDLE THIS PRE-HONEYCOMB
ObjectAnimator colorAnimation = ObjectAnimator.ofInt(findViewById(v.getId()), "backgroundColor", colorFrom, colorTo);
colorAnimation.setEvaluator(new ArgbEvaluator());
//colorAnimation.start();
ObjectAnimator txtColor = ObjectAnimator.ofInt(txtDesc, "textColor", getResources().getColor(R.color.bg), getResources().getColor(R.color.white));
txtColor.setEvaluator(new ArgbEvaluator());
//txtColor.start();
ObjectAnimator txtAnimation = ObjectAnimator.ofInt(txtDesc, "backgroundColor", getResources().getColor(R.color.white), colorTo);
txtAnimation.setEvaluator(new ArgbEvaluator());
//txtAnimation.start();
s.playTogether(colorAnimation, txtColor, txtAnimation);
s.setDuration(250).start();
本质上,我正在做的是当用户触摸屏幕时,我想更改多个视图的颜色。
提前感谢您提供的任何帮助。