Skip to content

Commit

Permalink
Merge pull request getodk#2902 from zestyping/ping/tintmode
Browse files Browse the repository at this point in the history
Use our themes to fix the default tintMode to SRC_IN.
  • Loading branch information
yanokwa authored Feb 21, 2019
2 parents 7fd83b7 + b4d0d85 commit 9553a18
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 @@ -70,6 +79,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 9553a18

Please sign in to comment.