summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorChet Haase <chet@google.com>2015-05-07 07:43:22 -0700
committerChet Haase <chet@google.com>2015-05-07 21:59:26 +0000
commitd96c87eb6464854822a2b26865785495a96105de (patch)
tree29a24f4852c478d5b89e0a400ceb9226e334ae79 /core
parent636a0da80533eff7fa8b67afb07277b0ba065d7c (diff)
downloadframeworks_base-d96c87eb6464854822a2b26865785495a96105de.zip
frameworks_base-d96c87eb6464854822a2b26865785495a96105de.tar.gz
frameworks_base-d96c87eb6464854822a2b26865785495a96105de.tar.bz2
Disable ActionBar animations pending more involved fix
Recycling of ActionBar items can cause problems with the current ActionBar animations, as the system animates views that represent both pre- and post-layout changes, sometimes causing opposit animations to run on the same view, resulting in unpredictable effect slike views remaining invisible. This 'fix' is a workaround to disable item animations pending a more complete and robust fix that involves a more involved system of view recycling that would avoid recycling views that are currently being used in animations. Issue #20538912 Menu missing in Downloads app Change-Id: I7b1d3baf94378e4788f868801a452c6583353842
Diffstat (limited to 'core')
-rw-r--r--core/java/android/widget/ActionMenuPresenter.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/java/android/widget/ActionMenuPresenter.java b/core/java/android/widget/ActionMenuPresenter.java
index e0b0e1f..f08141c 100644
--- a/core/java/android/widget/ActionMenuPresenter.java
+++ b/core/java/android/widget/ActionMenuPresenter.java
@@ -61,6 +61,7 @@ public class ActionMenuPresenter extends BaseMenuPresenter
implements ActionProvider.SubUiVisibilityListener {
private static final String TAG = "ActionMenuPresenter";
private static final int ITEM_ANIMATION_DURATION = 150;
+ private static final boolean ACTIONBAR_ANIMATIONS_ENABLED = false;
private OverflowMenuButton mOverflowButton;
private boolean mReserveOverflow;
@@ -414,7 +415,7 @@ public class ActionMenuPresenter extends BaseMenuPresenter
@Override
public void updateMenuView(boolean cleared) {
final ViewGroup menuViewParent = (ViewGroup) ((View) mMenuView).getParent();
- if (menuViewParent != null) {
+ if (menuViewParent != null && ACTIONBAR_ANIMATIONS_ENABLED) {
setupItemAnimations();
}
super.updateMenuView(cleared);