首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >playTogether(动画制作...)不适用于参数(ObjectAnimator、ObjectAnimator)

playTogether(动画制作...)不适用于参数(ObjectAnimator、ObjectAnimator)
EN

Stack Overflow用户
提问于 2013-07-21 14:32:34
回答 1查看 854关注 0票数 1

由于这个错误,Eclipse不允许我编译我的项目:

代码语言:javascript
复制
The method playTogether(Animator...) in the type AnimatorSet is not applicable for the arguments (ObjectAnimator, ObjectAnimator, ObjectAnimator)

以下是说明该问题的代码片段:

代码语言:javascript
复制
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();

本质上,我所做的是当用户触摸屏幕时,我想要更改许多视图的颜色。

预先感谢您所能提供的任何帮助。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-11-24 12:48:08

我同时拥有标准的android.animation.* import和nineoldandroids import.That,这显然导致了Eclipse变得混乱。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/17769730

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档