private View . OnTouchListener createCanceledOnTouchListener ( ) { return new View . OnTouchListener ( ) { @ SuppressLint ( "ClickableViewAccessibility" ) @ Override public boolean onTouch ( final View v , final MotionEvent event ) { return isCanceledOnTouchOutside ( ) && ! isFullscreen ( ) && onCanceledOnTouchOutside ( ) ; } } ; }
Creates and returns a listener which allows to cancel the dialog when touched outside the window .