Bug 877735 - Slide menu icon with other buttons in toolbar animation (r=mfinkle)

This commit is contained in:
Lucas Rocha 2013-05-30 19:47:44 +01:00
parent 940869fd2c
commit f9cd6b5dda

View File

@ -593,6 +593,7 @@ public class BrowserToolbar implements Tabs.OnTabsChangedListener,
if (mHasSoftMenuButton) {
ViewHelper.setTranslationX(mMenu, curveTranslation);
ViewHelper.setTranslationX(mMenuIcon, curveTranslation);
}
ViewHelper.setAlpha(mReader, 0);
@ -620,10 +621,14 @@ public class BrowserToolbar implements Tabs.OnTabsChangedListener,
PropertyAnimator.Property.TRANSLATION_X,
0);
if (mHasSoftMenuButton)
if (mHasSoftMenuButton) {
contentAnimator.attach(mMenu,
PropertyAnimator.Property.TRANSLATION_X,
0);
contentAnimator.attach(mMenuIcon,
PropertyAnimator.Property.TRANSLATION_X,
0);
}
contentAnimator.setPropertyAnimationListener(new PropertyAnimator.PropertyAnimationListener() {
@Override
@ -707,10 +712,14 @@ public class BrowserToolbar implements Tabs.OnTabsChangedListener,
PropertyAnimator.Property.TRANSLATION_X,
curveTranslation);
if (mHasSoftMenuButton)
if (mHasSoftMenuButton) {
contentAnimator.attach(mMenu,
PropertyAnimator.Property.TRANSLATION_X,
curveTranslation);
contentAnimator.attach(mMenuIcon,
PropertyAnimator.Property.TRANSLATION_X,
curveTranslation);
}
contentAnimator.setPropertyAnimationListener(new PropertyAnimator.PropertyAnimationListener() {
@Override