private void requestFocus ( ) { Window window = getWindow ( ) ; if ( window != null ) { window . setSoftInputMode ( WindowManager . LayoutParams . SOFT_INPUT_STATE_ALWAYS_VISIBLE ) ; } if ( editText != null ) { editText . requestFocus ( ) ; } }
Requests the focus and displays the keyboard .