I've find the answer for detection of "On DrawerLayout close".
I just needed to craeate a class which implements implements android.support.v4.widget.DrawerLayout.DrawerListener
and override the method onDrawerClosed(View view).
Last, I set DrawerListener to my drawer and it works.
For people who prefer practice, this is my code :
public class MyActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState)
DrawerLayout drawer = (DrawerLayout)findViewById(R.id.fullContent);
drawer.setDrawerListener(new RightMenuListener());
}
private class RightMenuListener implements android.support.v4.widget.DrawerLayout.DrawerListener {
@Override
public void onDrawerClosed(View view) {
EditText searchBar = (EditText)findViewById(R.id.searchText);
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(searchBar.getWindowToken(), 0);
}
[...]
}
}