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();
по сути то, что я делаю, когда пользователь касается экрана, я хочу, чтобы изменить цвет количества просмотров.
Благодарим вас за любую помощь, которую вы можете предложить.
Любая вероятность того, что 'AnimatorSet' не импортируется из NineOldAndroids, а стандартным SDK? –
Исходный пример Джейка Уортона на веб-сайте NineOldAndroids использует его ... – Strainy
Я пытаюсь сказать следующее: убедитесь, что весь ваш импорт указывает на 'com.nineoldandroids.animation. *' И что вы не смешиваете его с любым из 'android.animation. *' classes ... –