In my program I have an EditText that I set an OnKeyListener for. The problem is this seems to make it so the delete key no longer deletes text in the EditText. Can anyone tell me how to set the delete key so it deletes text from the EditText once again?
Below are the bare-bones of how I’m setting the onKeyListener:
searchEntryEditText.setOnKeyListener((onKeyListener = new OnKeyListener() {
@Override
if (event.getAction() != KeyEvent.ACTION_DOWN
& keyCode == 66) {
Globals.searchEntryString = searchEntryEditText
.getText().toString();
}
}));
Add a button and set keylisttner to clear the text field.