For #561 - Adds shadow/highlightto the bottom bar
parent
00d1be97ac
commit
5c092c1ef1
|
@ -287,6 +287,9 @@ class HomeFragment : Fragment() {
|
|||
)
|
||||
}
|
||||
}
|
||||
|
||||
// We need the shadow to be above the components.
|
||||
bottomBarShadow.bringToFront()
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
<?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>
|
||||
<solid android:color="@color/foundation_normal_theme" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:height="1dp" >
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#1AFFFFFF" />
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
|
@ -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>
|
||||
<gradient
|
||||
android:angle="45"
|
||||
android:startColor="#7529A7"
|
||||
android:centerColor="#492E85"
|
||||
android:endColor="#383372"
|
||||
android:type="linear" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:height="1dp" >
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#1AFFFFFF" />
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
|
@ -53,11 +53,20 @@
|
|||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="parent" />
|
||||
|
||||
<View
|
||||
android:id="@+id/bottomBarShadow"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/bottom_bar_shadow"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/bottom_bar"/>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/bottom_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:background="?homeBackground"
|
||||
android:background="?bottomBarBackground"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
|
@ -67,7 +76,7 @@
|
|||
android:transitionName="toolbar_wrapper_transition"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
<!-- Misc -->
|
||||
<attr name="homeBackground" format="reference"/>
|
||||
<attr name="bottomBarBackground" format="reference"/>
|
||||
<attr name="privateBrowsingButtonBackground" format="reference" />
|
||||
<attr name="privateBrowsingButtonAccent" format="reference" />
|
||||
<attr name="fenixLogo" format="reference" />
|
||||
|
|
|
@ -189,6 +189,7 @@
|
|||
<color name="text_scale_example_text_color">#232749</color>
|
||||
<color name="sync_error_background_color">#FFF36E</color>
|
||||
<color name="sync_error_text_color">#960E18</color>
|
||||
<color name="bottom_bar_shadow">#1A000000</color>
|
||||
|
||||
<!-- Reader View colors -->
|
||||
<color name="mozac_feature_readerview_text_color">@color/primary_text_light_theme</color>
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
<!-- Drawables -->
|
||||
<item name="fenixLogo">@drawable/ic_logo_wordmark_normal</item>
|
||||
<item name="homeBackground">@color/foundation_normal_theme</item>
|
||||
<item name="bottomBarBackground">@drawable/home_bottom_bar_background</item>
|
||||
<item name="privateBrowsingButtonBackground">@android:color/transparent</item>
|
||||
<item name="privateBrowsingButtonAccent">@color/primary_text_normal_theme</item>
|
||||
<item name="shieldLottieFile">@raw/shield_json</item>
|
||||
|
@ -135,6 +136,7 @@
|
|||
<!-- Drawables -->
|
||||
<item name="fenixLogo">@drawable/ic_logo_wordmark_private</item>
|
||||
<item name="homeBackground">@drawable/private_home_background_gradient</item>
|
||||
<item name="bottomBarBackground">@drawable/private_home_bottom_bar_background_gradient</item>
|
||||
<item name="privateBrowsingButtonBackground">@color/primary_text_private_theme</item>
|
||||
<item name="privateBrowsingButtonAccent">@color/above_private_theme</item>
|
||||
<item name="shieldLottieFile">@raw/shield_json_dark</item>
|
||||
|
|
Loading…
Reference in New Issue