summaryrefslogtreecommitdiff
path: root/core/java/android/app/SearchDialog.java
diff options
context:
space:
mode:
authorAmith Yamasani <yamasani@google.com>2010-03-04 14:29:54 -0800
committerAmith Yamasani <yamasani@google.com>2010-03-04 14:29:54 -0800
commitdefb1df520ce2e642dc42e8fc1082562294cf741 (patch)
treef92958406f5804b9dabf484888708c47f78d9e7d /core/java/android/app/SearchDialog.java
parentc37cb2469578f7d240615affb042e808b32ba5b2 (diff)
Show AutoCompleteTextView dropdown in Search dialog when cursor updates. Fixes b/2426929
Calls onFilterComplete when the data set changes, so that it can recompute whether the dropdown should be shown or not.
Diffstat (limited to 'core/java/android/app/SearchDialog.java')
-rw-r--r--core/java/android/app/SearchDialog.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/core/java/android/app/SearchDialog.java b/core/java/android/app/SearchDialog.java
index c2afd070a209..c951ce9a0351 100644
--- a/core/java/android/app/SearchDialog.java
+++ b/core/java/android/app/SearchDialog.java
@@ -576,7 +576,14 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS
}
mVoiceButton.setVisibility(visibility);
}
-
+
+ /** Called by SuggestionsAdapter when the cursor contents changed. */
+ void onDataSetChanged() {
+ if (mSearchAutoComplete != null && mSuggestionsAdapter != null) {
+ mSearchAutoComplete.onFilterComplete(mSuggestionsAdapter.getCount());
+ }
+ }
+
/**
* Hack to determine whether this is the browser, so we can adjust the UI.
*/