To hide an open keyboard while opening or closing the navigation drawer please override method onDrawerSlide
in onDrawerListner
and add below line
InputMethodManager inputMethodManager = (InputMethodManager) actionBarActivity
.getSystemService(Activity.INPUT_METHOD_SERVICE);
inputMethodManager.hideSoftInputFromWindow(
actionBarActivity.getCurrentFocus().getWindowToken(),
0
);