LinearGradient Android 9 Fix

Android 9 gradients play well with setting colors using all color resources OR attr, using both causes a crash.
This commit is contained in:
Hafiz 2023-03-24 23:40:15 -04:00
parent 118581db52
commit 351372e1c0
3 changed files with 4 additions and 2 deletions

View file

@ -3,8 +3,8 @@
<gradient
android:angle="90"
android:startColor="?attr/colorContentBackground"
android:centerColor="@color/transparent"
android:endColor="@color/transparent"
android:centerColor="?attr/colorGradientTransparentBackground"
android:endColor="?attr/colorGradientTransparentBackground"
android:type="linear"
android:centerX="0.6"/>
</shape>

View file

@ -7,6 +7,7 @@
<attr name="colorTintedBackgroundOffset" format="color" />
<attr name="colorContentBackgroundOffset" format="color" />
<attr name="colorWindowBackground" format="color" />
<attr name="colorGradientTransparentBackground" format="color" />
<attr name="textColorPrimary" format="color" />
<attr name="textColorSecondary" format="color" />
<attr name="textColorTintedPrimary" format="color" />

View file

@ -40,6 +40,7 @@
<item name="colorContentBackgroundOffset">@color/content_background_offset</item>
<item name="colorWindowBackground">@color/window_background</item>
<item name="colorTintedBackground">@color/brand_800</item>
<item name="colorGradientTransparentBackground">@color/transparent</item>
<item name="colorTintedBackgroundOffset">@color/brand_50012</item>
<item name="textColorTintedSecondary">@color/brand_sub_text</item>
<item name="textColorTintedPrimary">@color/brand_100</item>