@@ -420,18 +420,20 @@ protected boolean setFrame(final int l, int t, final int r, int b) {
420420
421421 @ Override
422422 public boolean onKeyUp (int keyCode , KeyEvent event ) {
423- boolean consumed = mPopup .onKeyUp (keyCode , event );
424- if (consumed ) {
425- switch (keyCode ) {
426- // if the list accepts the key events and the key event
427- // was a click, the text view gets the selected item
428- // from the drop down as its content
429- case KeyEvent .KEYCODE_ENTER :
430- case KeyEvent .KEYCODE_DPAD_CENTER :
431- if (event .hasNoModifiers ()) {
432- performCompletion ();
433- }
434- return true ;
423+ if (keyCode != KeyEvent .KEYCODE_TAB ) {
424+ boolean consumed = mPopup .onKeyUp (keyCode , event );
425+ if (consumed ) {
426+ switch (keyCode ) {
427+ // if the list accepts the key events and the key event
428+ // was a click, the text view gets the selected item
429+ // from the drop down as its content
430+ case KeyEvent .KEYCODE_ENTER :
431+ case KeyEvent .KEYCODE_DPAD_CENTER :
432+ if (event .hasNoModifiers ()) {
433+ performCompletion ();
434+ }
435+ return true ;
436+ }
435437 }
436438 }
437439 return super .onKeyUp (keyCode , event );
@@ -465,8 +467,10 @@ private void performCompletion(int position) {
465467
466468 @ Override
467469 public boolean onKeyDown (int keyCode , KeyEvent event ) {
468- if (mPopup .onKeyDown (keyCode , event )) {
469- return true ;
470+ if (keyCode != KeyEvent .KEYCODE_TAB ) {
471+ if (mPopup .onKeyDown (keyCode , event )) {
472+ return true ;
473+ }
470474 }
471475 boolean handled = super .onKeyDown (keyCode , event );
472476
0 commit comments