Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…7532 - Clean up bottom navigation bar colors
  • Loading branch information
ekager committed Jul 13, 2020
1 parent 98ad7ac commit 88af736
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 8 deletions.
19 changes: 19 additions & 0 deletions app/src/main/res/values-night-v23/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?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/. -->
<resources>
<style name="BottomSheet" parent="BottomSheetBase">
<item name="android:windowLightStatusBar">false</item>

<!-- Style the navigation bar -->
<item name="android:navigationBarColor">?foundation</item>
</style>

<style name="TabTrayDialogStyle" parent="TabTrayDialogStyleBase">
<item name="android:windowLightStatusBar">false</item>

<!-- Style the navigation bar -->
<item name="android:navigationBarColor">@color/foundation_normal_theme</item>
</style>
</resources>
7 changes: 7 additions & 0 deletions app/src/main/res/values-v23/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,11 @@
<!-- Style the navigation bar -->
<item name="android:navigationBarColor">?foundation</item>
</style>

<style name="BottomSheetPrivate" parent="BottomSheetBasePrivate">
<item name="android:windowLightStatusBar">false</item>

<!-- Style the navigation bar -->
<item name="android:navigationBarColor">?foundation</item>
</style>
</resources>
26 changes: 26 additions & 0 deletions app/src/main/res/values-v27/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,30 @@
<item name="android:navigationBarDividerColor">@android:color/transparent</item>
<item name="android:windowLightNavigationBar">false</item>
</style>

<style name="BottomSheetPrivate" parent="BottomSheetBasePrivate">
<item name="android:windowIsFloating">false</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:navigationBarColor">?foundation</item>
<item name="android:colorBackground">?foundation</item>
<!-- Style the navigation bar -->
<item name="android:navigationBarDividerColor">@android:color/transparent</item>
<item name="android:windowLightNavigationBar">false</item>
</style>

<style name="BottomSheet" parent="BottomSheetBase">
<item name="android:windowIsFloating">false</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:navigationBarColor">?foundation</item>
<item name="android:colorBackground">?foundation</item>
<!-- Style the navigation bar -->
<item name="android:windowLightNavigationBar">@bool/theme_is_light</item>
<item name="android:navigationBarDividerColor">@android:color/transparent</item>
</style>

<style name="TabTrayDialogStyle" parent="TabTrayDialogStyleBase">
<item name="android:navigationBarDividerColor">@android:color/transparent</item>
<item name="android:windowLightNavigationBar">@bool/theme_is_light</item>
<item name="android:navigationBarColor">@color/foundation_normal_theme</item>
</style>
</resources>
29 changes: 21 additions & 8 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
<item name="alertDialogStyle">@style/DialogStyleNormal</item>
<item name="alertDialogTheme">@style/DialogStyleNormal</item>
<item name="android:windowEnableSplitTouch">false</item>
<item name="android:navigationBarColor">@android:color/transparent</item>
<item name="android:splitMotionEvents">false</item>
<item name="bottomSheetDialogTheme">@style/BottomSheet</item>

<item name="mozacInputLayoutErrorTextColor"
tools:ignore="UnusedResources">@color/destructive_normal_theme</item>
Expand Down Expand Up @@ -153,6 +153,7 @@
<item name="alertDialogTheme">@style/DialogStyleDark</item>
<item name="android:windowEnableSplitTouch">false</item>
<item name="android:splitMotionEvents">false</item>
<item name="bottomSheetDialogTheme">@style/BottomSheetPrivate</item>

<item name="mozacInputLayoutErrorTextColor"
tools:ignore="UnusedResources">@color/destructive_private_theme</item>
Expand Down Expand Up @@ -542,18 +543,30 @@
<item name="android:textColorHint">@color/search_view_hint_color</item>
</style>

<style name="TabTrayDialogStyle" parent="Theme.Design.Light.BottomSheetDialog">
<item name="bottomSheetStyle">@style/BottomSheetModal</item>
<!-- <item name="android:textAppearance">@style/TextAppearance.AppCompat</item>-->
<!-- <item name="android:colorBackground">?foundation</item>-->
<style name="BottomSheetPrivate" parent="@style/BottomSheetBasePrivate" />

<style name="BottomSheet" parent="@style/BottomSheetBase" />

<!-- <item name="android:windowAnimationStyle">@style/Animation.Design.BottomSheetDialog</item>-->
<style name="BottomSheetBasePrivate" parent="Theme.MaterialComponents.BottomSheetDialog">
<item name="android:windowIsFloating">false</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:windowTranslucentNavigation">false</item>
<item name="android:navigationBarColor">@color/foundation_normal_theme</item>
<item name="android:colorBackground">?foundation</item>
</style>

<style name="BottomSheetBase" parent="Theme.MaterialComponents.Light.BottomSheetDialog">
<item name="android:windowIsFloating">false</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:colorBackground">?foundation</item>
</style>

<!-- Tab Tray does not present a private theme, so it needs to be separate from other bottom sheet styles -->
<style name="TabTrayDialogStyleBase" parent="BottomSheetBase">
<item name="bottomSheetStyle">@style/BottomSheetModal</item>
<item name="android:colorBackground">@color/foundation_normal_theme</item>
</style>

<style name="TabTrayDialogStyle" parent="TabTrayDialogStyleBase" />

<!-- Stuff to make the bottom sheet with round top borders -->
<style name="BottomSheetShapeAppearance" parent="ShapeAppearance.MaterialComponents.LargeComponent">
<item name="cornerFamily">rounded</item>
Expand Down

0 comments on commit 88af736

Please sign in to comment.