summaryrefslogtreecommitdiff
path: root/core/java/android/widget/AutoCompleteTextView.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/widget/AutoCompleteTextView.java')
-rw-r--r--core/java/android/widget/AutoCompleteTextView.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/core/java/android/widget/AutoCompleteTextView.java b/core/java/android/widget/AutoCompleteTextView.java
index 09add5ed9065..3bdba623b9b9 100644
--- a/core/java/android/widget/AutoCompleteTextView.java
+++ b/core/java/android/widget/AutoCompleteTextView.java
@@ -204,7 +204,7 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
private void onClickImpl() {
// If the dropdown is showing, bring the keyboard to the front
// when the user touches the text field.
- if (mPopup.isShowing()) {
+ if (isPopupShowing()) {
ensureImeVisible(true);
}
}
@@ -1008,7 +1008,7 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
protected boolean setFrame(final int l, int t, final int r, int b) {
boolean result = super.setFrame(l, t, r, b);
- if (mPopup.isShowing()) {
+ if (isPopupShowing()) {
showDropDown();
}
@@ -1054,6 +1054,10 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
mPopup.setAnchorView(this);
}
}
+ if (!isPopupShowing()) {
+ // Make sure the list does not obscure the IME when shown for the first time.
+ mPopup.setInputMethodMode(ListPopupWindow.INPUT_METHOD_NEEDED);
+ }
mPopup.show();
}