private void remove ( ) { if ( removing ) { return ; } 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 ) ; removing = false ; remove ( ) ; } } ; fadeOutAnimation . run ( 500 ) ; }
Remove a notification message . Recursive until all pending removals have been completed .