if ( deactiveNotifications.size() == 0 ) {
return;
}
removing = true;
final NotificationPopupView view = deactiveNotifications.get( 0 );
final LinearFadeOutAnimation fadeOutAnimation = new LinearFadeOutAnimation( view ) {
@Override
public void onUpdate( double progress ) {
super.onUpdate( progress );
for ( int i = 0; i < activeNotifications.size(); i++ ) {
NotificationPopupView v = activeNotifications.get( i );
final int left = v.getPopupLeft();
final int top = (int) ( ( ( i + 1 ) * SPACING ) - ( progress * SPACING ) );
v.setPopupPosition( left,
top );
}
}
@Override
public void onComplete() {
super.onComplete();
view.hide();
deactiveNotifications.remove( view );
activeNotifications.remove( view );
iocManager.destroyBean( view );
removing = false;
remove();
}
};
fadeOutAnimation.run( 500 );
}