1
0
Fork 0

For #7456 - For top toolbar set correct progress gravity and background

master
Emily Kager 2020-02-05 12:10:07 +01:00 committed by Emily Kager
parent 99d6dbfca4
commit 46fd1a04f1
3 changed files with 27 additions and 5 deletions

View File

@ -141,10 +141,10 @@ class BrowserToolbarView(
false
}
display.progressGravity = if (isCustomTabSession) {
DisplayToolbar.Gravity.BOTTOM
} else {
display.progressGravity = if (shouldUseBottomToolbar) {
DisplayToolbar.Gravity.TOP
} else {
DisplayToolbar.Gravity.BOTTOM
}
val primaryTextColor = ContextCompat.getColor(

View File

@ -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>

View File

@ -12,7 +12,7 @@
android:layout_width="match_parent"
android:layout_height="@dimen/browser_toolbar_height"
android:layout_gravity="top"
android:background="@drawable/toolbar_background"
android:background="@drawable/toolbar_background_top"
android:clickable="true"
android:focusable="true"
android:focusableInTouchMode="true"
@ -20,7 +20,7 @@
app:browserToolbarClearColor="?primaryText"
app:browserToolbarInsecureColor="?primaryText"
app:browserToolbarMenuColor="?primaryText"
app:browserToolbarProgressBarGravity="top"
app:browserToolbarProgressBarGravity="bottom"
app:browserToolbarSecureColor="?primaryText"
app:browserToolbarTrackingProtectionAndSecurityIndicatorSeparatorColor="?toolbarDivider" />
</com.google.android.material.appbar.AppBarLayout>