mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Bug 1056315 - Animate tab panel header on first tabs panel open. r=nalexander
This commit is contained in:
parent
9507984a43
commit
489e95cb88
@ -524,7 +524,12 @@ public class TabsPanel extends LinearLayout
|
||||
final Resources resources = getContext().getResources();
|
||||
final int toolbarHeight = resources.getDimensionPixelSize(R.dimen.browser_toolbar_height);
|
||||
final int translationY = (mVisible ? 0 : -toolbarHeight);
|
||||
animator.attach(mTabsContainer, PropertyAnimator.Property.ALPHA, 1.0f);
|
||||
if (mVisible) {
|
||||
ViewHelper.setTranslationY(mHeader, -toolbarHeight);
|
||||
ViewHelper.setTranslationY(mTabsContainer, -toolbarHeight);
|
||||
ViewHelper.setAlpha(mTabsContainer, 0.0f);
|
||||
}
|
||||
animator.attach(mTabsContainer, PropertyAnimator.Property.ALPHA, mVisible ? 1.0f : 0.0f);
|
||||
animator.attach(mTabsContainer, PropertyAnimator.Property.TRANSLATION_Y, translationY);
|
||||
animator.attach(mHeader, PropertyAnimator.Property.TRANSLATION_Y, translationY);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user