Skip to content

Commit

Permalink
Use our themes to fix the default tintMode to SRC_IN.
Browse files Browse the repository at this point in the history
  • Loading branch information
zestyping committed Feb 21, 2019
1 parent db01cdc commit b4d0d85
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions collect_app/src/main/res/values/theme.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@
<item name="android:textDirection" tools:targetApi="17">locale</item>
<item name="warningColor">@color/red_500</item>
<item name="dividerCompat">@android:drawable/divider_horizontal_dark</item>
<!--
The default tint mode for ImageViews is SRC_ATOP, which produces
incorrect blending results when tinting images with a colour that
has an alpha channel (for example, the alpha channel is used to
turn disabled buttons grey). The correct tint mode is SRC_IN,
which is the default tint mode in Android everywhere else. See:
https://developer.android.com/reference/android/widget/ImageView.html#attr_android:tint
-->
<item name="android:tintMode" tools:targetApi="21">src_in</item>
</style>

<style name="AppTheme.SettingsTheme.Dark" parent="BaseDarkAppTheme">
Expand Down Expand Up @@ -69,6 +78,7 @@
<item name="android:textDirection" tools:targetApi="17">locale</item>
<item name="warningColor">@color/red_500</item>
<item name="dividerCompat">@android:drawable/divider_horizontal_bright</item>
<item name="android:tintMode" tools:targetApi="21">src_in</item>
</style>

<style name="AlertDialogTheme.Light" parent="Theme.AppCompat.Light.Dialog.Alert">
Expand Down

0 comments on commit b4d0d85

Please sign in to comment.