invoke onEnterPressed callback only if shift is not pressed

This commit is contained in:
Daniel Gultsch 2015-09-04 19:33:31 +02:00
parent 9baa87e5c9
commit 1848b46195

View file

@ -36,7 +36,7 @@ public class EditMessage extends EditText {
@Override @Override
public boolean onKeyDown(int keyCode, KeyEvent event) { public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_ENTER) { if (keyCode == KeyEvent.KEYCODE_ENTER && !event.isShiftPressed()) {
if (keyboardListener != null && keyboardListener.onEnterPressed()) { if (keyboardListener != null && keyboardListener.onEnterPressed()) {
return true; return true;
} }