Bug 1180295 - Start plumbing inputs to the DynamicToolbarAnimator. r=rbarker

This commit is contained in:
Kartikaya Gupta 2015-08-18 14:27:18 -04:00
parent fcfbe37b0c
commit 47badbd517
2 changed files with 5 additions and 4 deletions

View File

@ -30,6 +30,7 @@ import org.mozilla.gecko.fxa.authenticator.AndroidFxAccount;
import org.mozilla.gecko.fxa.login.Engaged;
import org.mozilla.gecko.fxa.login.State;
import org.mozilla.gecko.gfx.BitmapUtils;
import org.mozilla.gecko.gfx.DynamicToolbarAnimator;
import org.mozilla.gecko.gfx.ImmutableViewportMetrics;
import org.mozilla.gecko.gfx.LayerMarginsAnimator;
import org.mozilla.gecko.gfx.LayerView;
@ -1629,7 +1630,7 @@ public class BrowserApp extends GeckoApp
if (mLayerView != null && height != mToolbarHeight) {
mToolbarHeight = height;
mLayerView.getLayerMarginsAnimator().setMaxMargins(0, height, 0, 0);
mLayerView.getDynamicToolbarAnimator().setMaxTranslation(height);
mDynamicToolbar.setVisible(true, VisibilityTransition.IMMEDIATE);
}
}

View File

@ -113,9 +113,9 @@ public class DynamicToolbar {
final boolean isImmediate = transition == VisibilityTransition.IMMEDIATE;
if (visible) {
layerView.getLayerMarginsAnimator().showMargins(isImmediate);
layerView.getDynamicToolbarAnimator().showToolbar(isImmediate);
} else {
layerView.getLayerMarginsAnimator().hideMargins(isImmediate);
layerView.getDynamicToolbarAnimator().hideToolbar(isImmediate);
}
}
@ -132,7 +132,7 @@ public class DynamicToolbar {
pinFlags.remove(reason);
}
layerView.getLayerMarginsAnimator().setMarginsPinned(!pinFlags.isEmpty());
layerView.getDynamicToolbarAnimator().setPinned(!pinFlags.isEmpty());
}
private void triggerEnabledListener() {