On focus out Keyboard hiding issue : after hiding keyBoard when I click in EditText it crashed
I am working on to hide keyboard when click out side the EditText. At first I set OnTouch listender & Click listener out site EditText elements. When those elements touched I am calling a custom method ( hideKeyBoard() show below ). private void hideKeyBoard() { InputMethodManager imm = (InputMethodManager) getSystemService( INPUT_METHOD_SERVICE ); imm.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0 ); } and additionally I have to add those competent few attribute like android :clickable= "true" android :focusable= "true" android :focusableInTouchMode= "true" to make those elements clickable & focusable. keyBoard was hiding & when I click EditText again I get error : Caused by: java . lang . NullPointerException : Attempt to invoke virtual method ' android . os . IBinder android . view . View . getWindowToken()' on a null object reference solution : after implementing th...