I want to achieve a simple task of unfocusing EditText (not hide cursor) when keyboard is dismissed, either by hitting the done or the return button. All I can find so far is 
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN)
But it is only good when the activity is first opened up. After keyboard is dismissed, text field is left in an awkward focused state.
 
     
     
     
     
    