Created
January 10, 2017 07:59
-
-
Save iammert/2f8caa9c5c59807965f48ea464af1b4d to your computer and use it in GitHub Desktop.
Keycode example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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