diff options
author | Romain Guy <romainguy@android.com> | 2009-06-22 11:09:20 -0700 |
---|---|---|
committer | Romain Guy <romainguy@android.com> | 2009-06-22 11:09:20 -0700 |
commit | 7299807d1895ea25cbe45d32b6edfd9a5723ee7a (patch) | |
tree | 0f4ba3adfe8894cfd00161c6e24be9fef3bc6e09 /core/java/android/widget/AutoCompleteTextView.java | |
parent | be7f0f78afde931ce6ea2d4ba61c340fac5722f6 (diff) | |
download | frameworks_base-7299807d1895ea25cbe45d32b6edfd9a5723ee7a.zip frameworks_base-7299807d1895ea25cbe45d32b6edfd9a5723ee7a.tar.gz frameworks_base-7299807d1895ea25cbe45d32b6edfd9a5723ee7a.tar.bz2 |
Fixes #1933585. Don't dismiss ACTV's drop down when it's set to alwaysVisible.
This change also resizes the drop down automatically whenever the soft input
method is shown/hidden.
Diffstat (limited to 'core/java/android/widget/AutoCompleteTextView.java')
-rw-r--r-- | core/java/android/widget/AutoCompleteTextView.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/java/android/widget/AutoCompleteTextView.java b/core/java/android/widget/AutoCompleteTextView.java index 8f1b0ee..5dd3ec4 100644 --- a/core/java/android/widget/AutoCompleteTextView.java +++ b/core/java/android/widget/AutoCompleteTextView.java @@ -585,7 +585,7 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe if (isPopupShowing()) { // special case for the back key, we do not even try to send it // to the drop down list but instead, consume it immediately - if (keyCode == KeyEvent.KEYCODE_BACK) { + if (keyCode == KeyEvent.KEYCODE_BACK && !mDropDownAlwaysVisible) { dismissDropDown(); return true; } @@ -755,7 +755,7 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe } else { // drop down is automatically dismissed when enough characters // are deleted from the text view - dismissDropDown(); + if (!mDropDownAlwaysVisible) dismissDropDown(); if (mFilter != null) { mFilter.filter(null); } @@ -896,7 +896,7 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe } } - if (mDropDownDismissedOnCompletion) { + if (mDropDownDismissedOnCompletion && !mDropDownAlwaysVisible) { dismissDropDown(); } } @@ -977,7 +977,7 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe if (hasFocus() && hasWindowFocus()) { showDropDown(); } - } else { + } else if (!mDropDownAlwaysVisible) { dismissDropDown(); } } @@ -986,7 +986,7 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe public void onWindowFocusChanged(boolean hasWindowFocus) { super.onWindowFocusChanged(hasWindowFocus); performValidation(); - if (!hasWindowFocus) { + if (!hasWindowFocus && !mDropDownAlwaysVisible) { dismissDropDown(); } } @@ -995,7 +995,7 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) { super.onFocusChanged(focused, direction, previouslyFocusedRect); performValidation(); - if (!focused) { + if (!focused && !mDropDownAlwaysVisible) { dismissDropDown(); } } |