invoke onEnterPressed callback only if shift is not pressed
This commit is contained in:
parent
9baa87e5c9
commit
1848b46195
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue