public void setDismissOnOutsideClick ( boolean enable ) { mDismissOnOutsideTouch = enable ; mSuggestionsSection . setOnTouchListener ( new OnTouchListener ( ) { @ Override public boolean onTouch ( View v , MotionEvent event ) { //todo check if this is called twice if ( mDismissOnOutsideTouch && mIsFocused ) { setSearchFocusedInternal ( false ) ; } return true ; } } ) ; }
Set whether a touch outside of the search bar s bounds will cause the search bar to loos focus .