i want to hide the soft keyboard when i click out side of editbox in a screen. how can i do this?
I got a good solution.I know its too late but when searching most of times getting this link as first link. so it may be helpful for others. If you click on any text/button it will hide the softkeyboard which is already visible.
date.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// Hide soft keyboard
InputMethodManager imm = (InputMethodManager) getSystemService(Activity.INPUT_METHOD_SERVICE);
imm.toggleSoftInput(InputMethodManager.HIDE_IMPLICIT_ONLY, 0);
// here i am showing the Date Dialog. one can proceed with their functionality
//show date picker dialog
showDialog(Date_DIALOG_ID);
}
});