diff options
author | kaiyiz <kaiyiz@codeaurora.org> | 2014-04-26 10:27:13 +0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2014-12-12 07:52:32 -0800 |
commit | 807e83e760488e00daa8f9eee0e3dee3e357c4a1 (patch) | |
tree | 82e12c8317e2e683f5da702aa34863259cf54ff9 /src/com/android/gallery3d | |
parent | 946cc8ee895d01774c2a75239e5892e9593419d7 (diff) | |
download | android_packages_apps_Gallery2-807e83e760488e00daa8f9eee0e3dee3e357c4a1.tar.gz android_packages_apps_Gallery2-807e83e760488e00daa8f9eee0e3dee3e357c4a1.tar.bz2 android_packages_apps_Gallery2-807e83e760488e00daa8f9eee0e3dee3e357c4a1.zip |
Gallery2: Fix menu display inconsistent with its cluster
The operation order is not correct.We should first execute
the change of cluster,then display menu title according to
the cluster.But we do the opposite operation,which cause the
menu will always display last cluster‘s corresponding menu
and cause this bug happened.
Modify the operation order.
CRs-fixed: 619812
Change-Id: I6cd3c82e065cef5a463e06295bf332e1459500e3
Diffstat (limited to 'src/com/android/gallery3d')
-rw-r--r-- | src/com/android/gallery3d/app/AlbumSetPage.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/com/android/gallery3d/app/AlbumSetPage.java b/src/com/android/gallery3d/app/AlbumSetPage.java index 1dca84068..068ac33a0 100644 --- a/src/com/android/gallery3d/app/AlbumSetPage.java +++ b/src/com/android/gallery3d/app/AlbumSetPage.java @@ -547,6 +547,13 @@ public class AlbumSetPage extends ActivityState implements inflater.inflate(R.menu.albumset, menu); boolean wasShowingClusterMenu = mShowClusterMenu; mShowClusterMenu = !inAlbum; + if (mShowClusterMenu != wasShowingClusterMenu) { + if (mShowClusterMenu) { + mActionBar.enableClusterMenu(mSelectedAction, this); + } else { + mActionBar.disableClusterMenu(true); + } + } boolean selectAlbums = !inAlbum && mActionBar.getClusterTypeAction() == FilterUtils.CLUSTER_BY_ALBUM; MenuItem selectItem = menu.findItem(R.id.action_select); @@ -571,13 +578,6 @@ public class AlbumSetPage extends ActivityState implements mActionBar.setTitle(mTitle); mActionBar.setSubtitle(mSubtitle); - if (mShowClusterMenu != wasShowingClusterMenu) { - if (mShowClusterMenu) { - mActionBar.enableClusterMenu(mSelectedAction, this); - } else { - mActionBar.disableClusterMenu(true); - } - } } return true; } |