2013-07-21 4 views
1

Eclipse, не позволит мне скомпилировать мой проект из-за этой ошибки:playTogether (аниматор ...) не применяется для аргументов (ObjectAnimator, ObjectAnimator)

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(); 

по сути то, что я делаю, когда пользователь касается экрана, я хочу, чтобы изменить цвет количества просмотров.

Благодарим вас за любую помощь, которую вы можете предложить.

+0

Любая вероятность того, что 'AnimatorSet' не импортируется из NineOldAndroids, а стандартным SDK? –

+0

Исходный пример Джейка Уортона на веб-сайте NineOldAndroids использует его ... – Strainy

+0

Я пытаюсь сказать следующее: убедитесь, что весь ваш импорт указывает на 'com.nineoldandroids.animation. *' И что вы не смешиваете его с любым из 'android.animation. *' classes ... –

ответ

0

У меня был и стандартный android.animation. * Импорт и импорт девяностых. Это явно заставило Eclipse запутаться.

Смежные вопросы