diff options
author | Android (Google) Code Review <android-gerrit@google.com> | 2009-06-11 04:53:01 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2009-06-11 04:53:01 -0700 |
commit | 174231d89adf4a01f28e6074eb8f743240400c26 (patch) | |
tree | 0ceabc134862e81a8701fec6d21ae30bb805def6 | |
parent | db8a6ae6bbd8cbb17fb79085ffb9d3fc539fe5c2 (diff) | |
parent | 50145bc883909c4b1533894a2b947eed21312514 (diff) | |
download | frameworks_base-174231d89adf4a01f28e6074eb8f743240400c26.zip frameworks_base-174231d89adf4a01f28e6074eb8f743240400c26.tar.gz frameworks_base-174231d89adf4a01f28e6074eb8f743240400c26.tar.bz2 |
Merge change 3879 into donut
* changes:
ACTV: getWindowVisibility() instead of private attach count
-rw-r--r-- | core/java/android/widget/AutoCompleteTextView.java | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/core/java/android/widget/AutoCompleteTextView.java b/core/java/android/widget/AutoCompleteTextView.java index f376ce5..585ce3d 100644 --- a/core/java/android/widget/AutoCompleteTextView.java +++ b/core/java/android/widget/AutoCompleteTextView.java @@ -123,10 +123,6 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe private AutoCompleteTextView.ListSelectorHider mHideSelector; - // Indicates whether this AutoCompleteTextView is attached to a window or not - // The widget is attached to a window when mAttachCount > 0 - private int mAttachCount; - private AutoCompleteTextView.PassThroughClickListener mPassThroughClickListener; public AutoCompleteTextView(Context context) { @@ -960,7 +956,8 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe /** {@inheritDoc} */ public void onFilterComplete(int count) { - if (mAttachCount <= 0) return; + // Not attached to window, don't update drop-down + if (getWindowVisibility() == View.GONE) return; /* * This checks enoughToFilter() again because filtering requests @@ -999,13 +996,11 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe @Override protected void onAttachedToWindow() { super.onAttachedToWindow(); - mAttachCount++; } @Override protected void onDetachedFromWindow() { dismissDropDown(); - mAttachCount--; super.onDetachedFromWindow(); } |