diff options
author | Romain Guy <romainguy@android.com> | 2010-02-01 14:56:19 -0800 |
---|---|---|
committer | Romain Guy <romainguy@android.com> | 2010-02-01 14:58:06 -0800 |
commit | 24562487126b48c8ff39a42b76f3705f238da6c8 (patch) | |
tree | 15b135b3106a76d6164f4d191b9f237c19ea1d85 /core | |
parent | 6a31dfa905695b3f6837fe76ab2f1c68e9d14b16 (diff) | |
download | frameworks_base-24562487126b48c8ff39a42b76f3705f238da6c8.zip frameworks_base-24562487126b48c8ff39a42b76f3705f238da6c8.tar.gz frameworks_base-24562487126b48c8ff39a42b76f3705f238da6c8.tar.bz2 |
Do not reshow the filter popup after hiding it.
This was causing the popup to show after moving a list out of the screen in
the new music app.
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/widget/AbsListView.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java index 649167e..1cc1c26 100644 --- a/core/java/android/widget/AbsListView.java +++ b/core/java/android/widget/AbsListView.java @@ -449,6 +449,10 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te private int mMaximumVelocity; final boolean[] mIsScrap = new boolean[1]; + + // True when the popup should be hidden because of a call to + // dispatchDisplayHint() + private boolean mPopupHidden; /** * Interface definition for a callback to be invoked when the list or grid @@ -3024,6 +3028,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te } break; } + mPopupHidden = hint == INVISIBLE; } /** @@ -3033,6 +3038,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te if (mPopup != null) { mPopup.dismiss(); } + mPopupHidden = false; } /** @@ -3309,7 +3315,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te public void onGlobalLayout() { if (isShown()) { // Show the popup if we are filtered - if (mFiltered && mPopup != null && !mPopup.isShowing()) { + if (mFiltered && mPopup != null && !mPopup.isShowing() && !mPopupHidden) { showPopup(); } } else { |