In my android application for an EditText with number input type, I want to trigger an action as the cross(cancel) button is clicked from the numeric keypad like "Done" button but unable to trigger. Here what I am trying. Thanks
pinNum3.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
if (actionId == EditorInfo.IME_ACTION_PREVIOUS) {
pinNum2.requestFocus();
return true;
}
return false;
}
});