| Index: chrome/android/java/src/org/chromium/chrome/browser/toolbar/BottomToolbarPhone.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/BottomToolbarPhone.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/BottomToolbarPhone.java
|
| index 494538dd9c63e7a07c7dd209b05ab81c8ea0ff1c..18dbc648d6069d31c0e9f31910e1bd63e835704b 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/BottomToolbarPhone.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/BottomToolbarPhone.java
|
| @@ -5,6 +5,7 @@
|
| package org.chromium.chrome.browser.toolbar;
|
|
|
| import android.content.Context;
|
| +import android.support.v7.widget.Toolbar;
|
| import android.util.AttributeSet;
|
| import android.view.ViewGroup;
|
|
|
| @@ -31,6 +32,25 @@ public class BottomToolbarPhone extends ToolbarPhone implements BottomSheetObser
|
| private float mLastHeightFraction;
|
|
|
| /**
|
| + * Sets the height and title text appearance of the provided toolbar so that its style is
|
| + * consistent with BottomToolbarPhone.
|
| + * @param toolbar The toolbar to style.
|
| + */
|
| + public static void setToolbarStyle(Toolbar toolbar) {
|
| + // Android's Toolbar class typically changes its height based on device orientation.
|
| + // BottomToolbarPhone has a fixed height. Update |toolbar| to match.
|
| + toolbar.getLayoutParams().height =
|
| + toolbar.getResources().getDimensionPixelOffset(R.dimen.toolbar_height_no_shadow);
|
| +
|
| + // Android Toolbar action buttons are aligned based on the minimum height.
|
| + toolbar.setMinimumHeight(
|
| + toolbar.getResources().getDimensionPixelOffset(R.dimen.toolbar_height_no_shadow));
|
| +
|
| + toolbar.setTitleTextAppearance(toolbar.getContext(), R.style.BottomSheetContentTitle);
|
| + toolbar.requestLayout();
|
| + }
|
| +
|
| + /**
|
| * Constructs a BottomToolbarPhone object.
|
| * @param context The Context in which this View object is created.
|
| * @param attrs The AttributeSet that was specified with this View.
|
|
|