diff options
| author | Adam Powell <adamp@google.com> | 2011-02-16 16:49:50 -0800 |
|---|---|---|
| committer | Adam Powell <adamp@google.com> | 2011-02-16 16:55:45 -0800 |
| commit | 348e69cfabec21ccfbe708df06f0a7ea541a3053 (patch) | |
| tree | fc54d7b8550bfc38be9ecaa5529749d0653fbdb6 /core/java/android/widget/AutoCompleteTextView.java | |
| parent | 5a5b4ba9fe40605d5e43b7ff25a58f7174509a53 (diff) | |
Fix bug 3413800 - Revise AutoCompleteTextView dropdown behavior
Be more conservative with when we let an AutoCompleteTextView's
dropdown box of completion suggestions cover the IME.
Disable the expand-when-touched behavior of the dropdown list when
more than 3 items can be seen at a time without it.
Don't let a ListPopupWindow that is expanding in response to touch
scroll the anchor view within its parent and slide the dropdown out
from under the user's finger.
Change-Id: I009accfd4e841c9a5e1072735d8a0b067a0bc06a
Diffstat (limited to 'core/java/android/widget/AutoCompleteTextView.java')
| -rw-r--r-- | core/java/android/widget/AutoCompleteTextView.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/java/android/widget/AutoCompleteTextView.java b/core/java/android/widget/AutoCompleteTextView.java index 3bdba623b9b9..27610b9fe5c2 100644 --- a/core/java/android/widget/AutoCompleteTextView.java +++ b/core/java/android/widget/AutoCompleteTextView.java @@ -92,6 +92,8 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe static final boolean DEBUG = false; static final String TAG = "AutoCompleteTextView"; + static final int EXPAND_MAX = 3; + private CharSequence mHintText; private TextView mHintView; private int mHintResource; @@ -1057,8 +1059,10 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe if (!isPopupShowing()) { // Make sure the list does not obscure the IME when shown for the first time. mPopup.setInputMethodMode(ListPopupWindow.INPUT_METHOD_NEEDED); + mPopup.setListItemExpandMax(EXPAND_MAX); } mPopup.show(); + mPopup.getListView().setOverScrollMode(View.OVER_SCROLL_ALWAYS); } /** |
