Dismiss "recipient alternates popup" when pressing the back button
@@ -337,6 +337,15 @@ public class RecipientSelectView extends TokenCompleteTextView<Recipient> implem
listView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
}
+ @Override
+ public boolean onKeyPreIme(int keyCode, KeyEvent event) {
+ if (keyCode == KeyEvent.KEYCODE_BACK && alternatesPopup.isShowing()) {
+ alternatesPopup.dismiss();
+ return true;
+ }
+ return super.onKeyPreIme(keyCode, event);
+ }
+
@Override
public boolean onKeyDown(int keyCode, @NonNull KeyEvent event) {
alternatesPopup.dismiss();
