File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
auth/src/main/java/com/firebase/ui/auth/ui Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -17,9 +17,15 @@ public static void setImeOnDoneListener(EditText doneEditText,
1717 doneEditText .setOnEditorActionListener (new TextView .OnEditorActionListener () {
1818 @ Override
1919 public boolean onEditorAction (TextView view , int actionId , KeyEvent event ) {
20- if (event != null
21- && event .getKeyCode () == KeyEvent .KEYCODE_ENTER
22- || actionId == EditorInfo .IME_ACTION_DONE ) {
20+ if (event != null && event .getKeyCode () == KeyEvent .KEYCODE_ENTER ) {
21+ if (event .getAction () == KeyEvent .ACTION_UP ) {
22+ listener .onDonePressed ();
23+ }
24+
25+ // We need to return true even if we didn't handle the event to continue
26+ // receiving future callbacks.
27+ return true ;
28+ } else if (actionId == EditorInfo .IME_ACTION_DONE ) {
2329 listener .onDonePressed ();
2430 return true ;
2531 }
You can’t perform that action at this time.
0 commit comments