summaryrefslogtreecommitdiff
path: root/core/java/android/widget/AutoCompleteTextView.java
diff options
context:
space:
mode:
authorKarl Rosaen <krosaen@google.com>2009-08-06 16:13:14 -0700
committerKarl Rosaen <krosaen@google.com>2009-08-06 16:23:19 -0700
commita7a3b6ef0fdaf6b17993642b76baf90a03ae0077 (patch)
tree4fd9ea98990ee7b239757cd69746e0b8c6f62dc2 /core/java/android/widget/AutoCompleteTextView.java
parente303d2cf94da6bb7f0569fbddd6dfd5b85ed8295 (diff)
Dismiss both the soft keyboard and the search dialog on back if there is no text entered and no shortcuts are being obscured by the soft keyboard.
Fixes bug 2039508. This makes backing out of the search dialog easier when dismissing the soft keyboard doesn't really add any value.
Diffstat (limited to 'core/java/android/widget/AutoCompleteTextView.java')
-rw-r--r--core/java/android/widget/AutoCompleteTextView.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/java/android/widget/AutoCompleteTextView.java b/core/java/android/widget/AutoCompleteTextView.java
index 456f8ed845a4..02d77d1e0b25 100644
--- a/core/java/android/widget/AutoCompleteTextView.java
+++ b/core/java/android/widget/AutoCompleteTextView.java
@@ -862,6 +862,16 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
return ListView.INVALID_POSITION;
}
+
+ /**
+ * @hide
+ * @return {@link android.widget.ListView#getChildCount()} of the drop down if it is showing,
+ * otherwise 0.
+ */
+ protected int getDropDownChildCount() {
+ return mDropDownList == null ? 0 : mDropDownList.getChildCount();
+ }
+
/**
* <p>Starts filtering the content of the drop down list. The filtering
* pattern is the content of the edit box. Subclasses should override this