Skip to content

Instantly share code, notes, and snippets.

@iammert
Created January 10, 2017 07:59
Show Gist options
  • Save iammert/2f8caa9c5c59807965f48ea464af1b4d to your computer and use it in GitHub Desktop.
Save iammert/2f8caa9c5c59807965f48ea464af1b4d to your computer and use it in GitHub Desktop.
Keycode example
public View.OnKeyListener getOnKeyListener(){
return (v, keyCode, event) -> {
if(keyCode == KeyEvent.KEYCODE_DEL && searchText.get().equals("")) {
if (event.getAction()!=KeyEvent.ACTION_DOWN)
return true;
rxBus.send(new DeleteAddedUserFromKeyboardEvent());
}
return false;
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment