summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-07-16 19:54:19 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-07-16 19:54:19 -0700
commitf32f746b83826303350417ff9937a6f9e5488f24 (patch)
treede3bbd4d0703bcb37d9e5b3eae62d84c0a5822fd
parent3e522c45b2fad6ae0256e00ae54ac1e68e29e508 (diff)
parentffe3ecf2b1ee04288008758c0f60ae22238797c1 (diff)
downloadframeworks_base-f32f746b83826303350417ff9937a6f9e5488f24.zip
frameworks_base-f32f746b83826303350417ff9937a6f9e5488f24.tar.gz
frameworks_base-f32f746b83826303350417ff9937a6f9e5488f24.tar.bz2
Merge change 7645 into donut
* changes: Make the SearchDialog's AutoCompleteTextView dropdown respect the IME again when the user presses right or left from a query-jammed suggestion to continue editing. Previously we required the user to press on the text field again in order to get the IME to show.
-rw-r--r--core/java/android/app/SearchDialog.java2
-rw-r--r--core/java/android/widget/AutoCompleteTextView.java15
2 files changed, 14 insertions, 3 deletions
diff --git a/core/java/android/app/SearchDialog.java b/core/java/android/app/SearchDialog.java
index bfd9923..359cdac 100644
--- a/core/java/android/app/SearchDialog.java
+++ b/core/java/android/app/SearchDialog.java
@@ -1042,6 +1042,8 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS
mSearchAutoComplete.setSelection(selPoint);
mSearchAutoComplete.setListSelection(0);
mSearchAutoComplete.clearListSelection();
+ mSearchAutoComplete.ensureImeVisible();
+
return true;
}
diff --git a/core/java/android/widget/AutoCompleteTextView.java b/core/java/android/widget/AutoCompleteTextView.java
index 9eef98c..0df587f 100644
--- a/core/java/android/widget/AutoCompleteTextView.java
+++ b/core/java/android/widget/AutoCompleteTextView.java
@@ -210,8 +210,7 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
if (mDropDownAlwaysVisible
&& mPopup.isShowing()
&& mPopup.getInputMethodMode() == PopupWindow.INPUT_METHOD_NOT_NEEDED) {
- mPopup.setInputMethodMode(PopupWindow.INPUT_METHOD_NEEDED);
- showDropDown();
+ ensureImeVisible();
}
}
@@ -1086,11 +1085,21 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
/**
* Issues a runnable to show the dropdown as soon as possible.
*
- * @hide internal used only by Search Dialog
+ * @hide internal used only by SearchDialog
*/
public void showDropDownAfterLayout() {
post(mShowDropDownRunnable);
}
+
+ /**
+ * Ensures that the drop down is not obscuring the IME.
+ *
+ * @hide internal used only here and SearchDialog
+ */
+ public void ensureImeVisible() {
+ mPopup.setInputMethodMode(PopupWindow.INPUT_METHOD_NEEDED);
+ showDropDown();
+ }
/**
* <p>Displays the drop down on screen.</p>