Fixed fab background color in dark mode

Now it's recognizable from the background
This commit is contained in:
Viktor De Pasquale 2019-11-14 19:10:49 +01:00
parent 9d1d1710eb
commit 2105cacce3
7 changed files with 6 additions and 14 deletions

View File

@ -43,7 +43,7 @@
android:layout_marginStart="@dimen/l1"
android:layout_marginEnd="@dimen/l1"
android:layout_marginBottom="@{viewModel.insets.bottom + (int) @dimen/l1}"
app:backgroundTint="?colorSurface"
app:backgroundTint="?colorSurfaceSurfaceVariant"
app:srcCompat="@drawable/ic_filter"
app:tint="?colorPrimary"
tools:layout_marginBottom="64dp" />

View File

@ -46,7 +46,7 @@
android:layout_marginStart="@dimen/l1"
android:layout_marginEnd="@dimen/l1"
android:layout_marginBottom="@{viewModel.insets.bottom + (int) @dimen/l1}"
app:backgroundTint="?colorSurface"
app:backgroundTint="?colorSurfaceSurfaceVariant"
app:srcCompat="@drawable/ic_filter"
app:tint="?colorPrimary"
tools:layout_marginBottom="64dp" />

View File

@ -8,6 +8,7 @@
<item name="colorSecondaryVariant">#8000C853</item>
<item name="colorSurface">#0D0D0D</item>
<item name="colorSurfaceVariant">#1F1F1F</item>
<item name="colorSurfaceSurfaceVariant">?colorSurfaceVariant</item>
<item name="colorOnPrimary">#F2F2F2</item>
<item name="colorOnPrimaryVariant">#D9E6E6E6</item>
<item name="colorOnSecondary">#F2F2F2</item>

View File

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="WidgetFoundation.Card.Elevated" parent="Widget.MaterialComponents.CardView">
<item name="cardBackgroundColor">?colorSurfaceVariant</item>
<item name="cardCornerRadius">@dimen/l_50</item>
<item name="cardElevation">@dimen/l_125</item>
<item name="cardPreventCornerOverlap">true</item>
</style>
</resources>

View File

@ -96,6 +96,7 @@
<attr name="colorSurfaceVariant" format="color" />
<attr name="colorOnPrimaryVariant" format="color" />
<attr name="colorOnSurfaceVariant" format="color" />
<attr name="colorSurfaceSurfaceVariant" format="color" />
<!--endregion-->

View File

@ -103,6 +103,7 @@
<item name="colorSecondaryVariant">#8000C853</item>
<item name="colorSurface">#F2F2F2</item>
<item name="colorSurfaceVariant">#E8E8E8</item>
<item name="colorSurfaceSurfaceVariant">?colorSurface</item>
<item name="colorOnPrimary">#F2F2F2</item>
<item name="colorOnPrimaryVariant">#D9E6E6E6</item>
<item name="colorOnSecondary">#F2F2F2</item>

View File

@ -37,7 +37,7 @@ variant. Make sure to use style referenced by attribute defined it attrs.xml.
</style>
<style name="WidgetFoundation.Card.Elevated" parent="Widget.MaterialComponents.CardView">
<item name="cardBackgroundColor">?colorSurface</item>
<item name="cardBackgroundColor">?colorSurfaceSurfaceVariant</item>
<item name="cardCornerRadius">@dimen/l_50</item>
<item name="cardElevation">@dimen/l_125</item>
<item name="cardPreventCornerOverlap">true</item>