I have PopupWindow
one that uses alpha animation to create a window with window shading.
Usage PopupWindow.setAnimationStyle()
works as expected: the popup disappears when displayed.
However, as soon as the popup is displayed (which means the fade animation is complete), I would like to start a new animation.
I tried using the following to get the basic animation that is referenced through setAnimationStyle()
and attach to it AnimationListener
:
Animation fadeInAnimation = AnimationUtils.loadAnimation(this, R.anim.popup_fade_in);
fadeInAnimation.setAnimationListener(new AnimationListener() {
@Override
public void onAnimationStart(Animation animation) {
Log.d(TAG, "fade-in animation START");
}
@Override
public void onAnimationEnd(Animation animation) {
Log.d(TAG, "fade-in animation END");
}
@Override
public void onAnimationRepeat(Animation animation) {
}
});
This does not work: none of the methods are AnimationListener
ever called.
Does anyone know how to determine when a popup animation has ended?
, , , . , API, , .
!