public boolean dismissPopup ( ) { if ( isShowingPopup ( ) ) { getListPopupWindow ( ) . dismiss ( ) ; ViewTreeObserver viewTreeObserver = getViewTreeObserver ( ) ; if ( viewTreeObserver . isAlive ( ) ) { viewTreeObserver . removeGlobalOnLayoutListener ( mOnGlobalLayoutListener ) ; } } return true ; }
Dismisses the popup window with activities .