im trying to get the code when user hides the keyboard to activate some methods. To do that i have implemented this listener on the editText:
cantidadET.setOnKeyListener(new View.OnKeyListener() {
@Override
public boolean onKey(View v, int keyCode, KeyEvent event) {
if(event.getAction() == KeyEvent.ACTION_DOWN && (keyCode == KeyEvent.KEYCODE_ENTER || keyCode == KeyEvent.???)){
v.clearFocus();
hideKeyboardFrom(getContext(), v);
doCalculations();
return true;
}
return false;
}
});
The problem is that i cant get the keycode of the down arrow that hides the keyboard as i show on this image:
I have tried to get the code using Log.d but no code is returned. So, how can i get that code or there is another way to activate the methods when user finish introducing data?