diff options
author | Owen Lin <owenlin@google.com> | 2009-11-10 17:37:21 +0800 |
---|---|---|
committer | Owen Lin <owenlin@google.com> | 2009-12-02 13:29:24 +0800 |
commit | 86d784ba89f92835058148eaf31fb5d08ebe1bb0 (patch) | |
tree | 71cbbebe73b464b022066ad105b0597839376462 /src | |
parent | 7dfaf5446aa8f49823dbace45ae358e2c53e865c (diff) | |
download | LegacyCamera-86d784ba89f92835058148eaf31fb5d08ebe1bb0.zip LegacyCamera-86d784ba89f92835058148eaf31fb5d08ebe1bb0.tar.gz LegacyCamera-86d784ba89f92835058148eaf31fb5d08ebe1bb0.tar.bz2 |
Fix the bug that the on-screen menu kept the position in last time.
http://b/issue?id=2199588
Change-Id: Ia8b423918494dcb5e71b8b4185381a22c2ab7504
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/camera/OnScreenSettings.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/camera/OnScreenSettings.java b/src/com/android/camera/OnScreenSettings.java index 937b298..c5bbaf3 100644 --- a/src/com/android/camera/OnScreenSettings.java +++ b/src/com/android/camera/OnScreenSettings.java @@ -24,6 +24,7 @@ import android.preference.ListPreference; import android.preference.Preference; import android.preference.PreferenceGroup; import android.preference.PreferenceScreen; +import android.util.Log; import android.view.Display; import android.view.Gravity; import android.view.KeyEvent; @@ -142,8 +143,9 @@ public class OnScreenSettings { mIsVisible = visible; if (visible) { - // Update main adapter before show up - if (mMainAdapter != null) mMainAdapter.notifyDataSetChanged(); + // Invalid the main adapter before show up, so it would be like + // a new created list + if (mMainAdapter != null) mMainAdapter.notifyDataSetInvalidated(); if (mContainerLayoutParams.token == null) { mContainerLayoutParams.token = mOwnerView.getWindowToken(); } |