由于这个错误,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();本质上,我所做的是当用户触摸屏幕时,我想要更改许多视图的颜色。
预先感谢您所能提供的任何帮助。
发布于 2015-11-24 12:48:08
我同时拥有标准的android.animation.* import和nineoldandroids import.That,这显然导致了Eclipse变得混乱。
https://stackoverflow.com/questions/17769730
复制相似问题