Я тратил столько потоков на эту тему, что я могу найти на мерцании, которое возникает в Android 2.2 при работе с AnimationListeners, но я не могу решить мою проблему.
У меня есть LinearLayout 'popover', который пользователь прикасается, чтобы опуститься примерно на 100 пикселей, и снова коснется, чтобы переместить его обратно. Я, наконец, начал работать над первой частью без какого-либо мерцания (благодаря предложению вызывать clearAnimation() на анимированном представлении), но когда вы делаете обратное (т.е. Перемещаете представление вверх), там мерцание начало. Я не могу называть clearAnimation() в методе onAnimationStart(), поскольку он не будет анимировать!
Конечно, вся анимация отлично работает, если я использовал setFillAfter() без прослушивателя анимации, но тогда сенсорная область просмотра не будет двигаться (потому что само представление не "фактически" перемещено).
Любая помощь будет принята с благодарностью.
this.popoverTab.setOnClickListener(new OnClickListener() {
    public void onClick(View v) {
        popoverTab.setClickable(false);
        popoverTab.setFocusable(false);
        if (popoverHidden) {
            Log.d(TAG, "About to show popover");
            // the popover is currently hidden, show it.
            TranslateAnimation animation = new TranslateAnimation(0, 0, 100, 0);
            animation.setDuration(700);
            animation.setFillBefore(true);
            animation.setAnimationListener(new AnimationListener() {
                public void onAnimationEnd(Animation animation) {
                }
                public void onAnimationRepeat(Animation animation) {
                }
                public void onAnimationStart(Animation animation) {
                    footer.layout(footer.getLeft(), (footer.getTop() - 100), footer.getRight(), footer.getBottom());
                }
            });
            footer.startAnimation(animation);
        } else {
            Log.d(TAG, "About to hide popover");
            // the popover is showing, hide it.
            TranslateAnimation animation = new TranslateAnimation(0, 0, 0, 100);
            animation.setDuration(700);
            animation.setFillAfter(true);
            animation.setAnimationListener(new AnimationListener() {
                public void onAnimationEnd(Animation animation) {
                    footer.clearAnimation();
                    footer.layout(footer.getLeft(), (footer.getTop() + 100), footer.getRight(), footer.getBottom());
                }
                public void onAnimationRepeat(Animation animation) {
                }
                public void onAnimationStart(Animation animation) {
                }
            });
            footer.startAnimation(animation);
        }
        // invert.
        popoverHidden = !popoverHidden;
        popoverTab.setClickable(true);
        popoverTab.setFocusable(true);
    }
});
