For #7456 - For top toolbar set correct progress gravity and background
parent
99d6dbfca4
commit
46fd1a04f1
|
@ -141,10 +141,10 @@ class BrowserToolbarView(
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
display.progressGravity = if (isCustomTabSession) {
|
display.progressGravity = if (shouldUseBottomToolbar) {
|
||||||
DisplayToolbar.Gravity.BOTTOM
|
|
||||||
} else {
|
|
||||||
DisplayToolbar.Gravity.TOP
|
DisplayToolbar.Gravity.TOP
|
||||||
|
} else {
|
||||||
|
DisplayToolbar.Gravity.BOTTOM
|
||||||
}
|
}
|
||||||
|
|
||||||
val primaryTextColor = ContextCompat.getColor(
|
val primaryTextColor = ContextCompat.getColor(
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item>
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<gradient
|
||||||
|
android:angle="45"
|
||||||
|
android:startColor="?toolbarStartGradient"
|
||||||
|
android:centerColor="?toolbarCenterGradient"
|
||||||
|
android:endColor="?toolbarEndGradient"
|
||||||
|
android:type="linear" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<item android:gravity="bottom">
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<size android:height="1dp" />
|
||||||
|
<solid android:color="?neutralFaded" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</layer-list>
|
|
@ -12,7 +12,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/browser_toolbar_height"
|
android:layout_height="@dimen/browser_toolbar_height"
|
||||||
android:layout_gravity="top"
|
android:layout_gravity="top"
|
||||||
android:background="@drawable/toolbar_background"
|
android:background="@drawable/toolbar_background_top"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:focusableInTouchMode="true"
|
android:focusableInTouchMode="true"
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
app:browserToolbarClearColor="?primaryText"
|
app:browserToolbarClearColor="?primaryText"
|
||||||
app:browserToolbarInsecureColor="?primaryText"
|
app:browserToolbarInsecureColor="?primaryText"
|
||||||
app:browserToolbarMenuColor="?primaryText"
|
app:browserToolbarMenuColor="?primaryText"
|
||||||
app:browserToolbarProgressBarGravity="top"
|
app:browserToolbarProgressBarGravity="bottom"
|
||||||
app:browserToolbarSecureColor="?primaryText"
|
app:browserToolbarSecureColor="?primaryText"
|
||||||
app:browserToolbarTrackingProtectionAndSecurityIndicatorSeparatorColor="?toolbarDivider" />
|
app:browserToolbarTrackingProtectionAndSecurityIndicatorSeparatorColor="?toolbarDivider" />
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
Loading…
Reference in New Issue