diff options
Diffstat (limited to 'core/java/android/widget/ActionMenuPresenter.java')
| -rw-r--r-- | core/java/android/widget/ActionMenuPresenter.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/java/android/widget/ActionMenuPresenter.java b/core/java/android/widget/ActionMenuPresenter.java index 710d59e..36bce0b 100644 --- a/core/java/android/widget/ActionMenuPresenter.java +++ b/core/java/android/widget/ActionMenuPresenter.java @@ -381,12 +381,13 @@ public class ActionMenuPresenter extends BaseMenuPresenter computeMenuItemAnimationInfo(true); final ViewTreeObserver observer = menuViewParent.getViewTreeObserver(); if (observer != null) { - observer.addOnDrawListener(new ViewTreeObserver.OnDrawListener() { + observer.addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() { @Override - public void onDraw() { + public boolean onPreDraw() { computeMenuItemAnimationInfo(false); - observer.removeOnDrawListener(this); + observer.removeOnPreDrawListener(this); runItemAnimations(); + return true; } }); } |
