From 6b5a1d0202d939a2aecc756115fbf486cb81bc98 Mon Sep 17 00:00:00 2001 From: krlvm <51774833+krlvm@users.noreply.github.com> Date: Fri, 2 Apr 2021 23:58:10 +0300 Subject: [PATCH] Fix Player controls colors on KitKat AppCompatImageButton ignores "tint" theme attribute on API 19, therefore, they had to be specified directly, these attributes can be removed after the KitKat support is dropped. --- app/src/main/res/layout-large-land/player.xml | 14 ++++++++++++++ app/src/main/res/layout/player.xml | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/app/src/main/res/layout-large-land/player.xml b/app/src/main/res/layout-large-land/player.xml index 12dc132a5..de15b9da9 100644 --- a/app/src/main/res/layout-large-land/player.xml +++ b/app/src/main/res/layout-large-land/player.xml @@ -103,6 +103,7 @@ android:padding="@dimen/player_main_buttons_padding" android:scaleType="fitXY" android:visibility="gone" + app:tint="@color/white" app:srcCompat="@drawable/ic_close" tools:ignore="ContentDescription,RtlHardcoded" /> @@ -188,6 +189,7 @@ android:paddingBottom="3dp" android:scaleType="fitCenter" android:visibility="gone" + app:tint="@color/white" app:srcCompat="@drawable/ic_list" tools:ignore="ContentDescription,RtlHardcoded" tools:visibility="visible" /> @@ -206,6 +208,7 @@ android:paddingBottom="3dp" android:scaleType="fitCenter" android:visibility="gone" + app:tint="@color/white" app:srcCompat="@drawable/ic_format_list_numbered" tools:ignore="ContentDescription,RtlHardcoded" tools:visibility="visible" /> @@ -219,6 +222,7 @@ android:focusable="true" android:padding="@dimen/player_main_buttons_padding" android:scaleType="fitXY" + app:tint="@color/white" app:srcCompat="@drawable/ic_expand_more" tools:ignore="ContentDescription,RtlHardcoded" /> @@ -283,6 +287,7 @@ android:focusable="true" android:padding="@dimen/player_main_buttons_padding" android:scaleType="fitXY" + app:tint="@color/white" app:srcCompat="@drawable/ic_cast" tools:ignore="RtlHardcoded" /> @@ -297,6 +302,7 @@ android:focusable="true" android:padding="@dimen/player_main_buttons_padding" android:scaleType="fitXY" + app:tint="@color/white" app:srcCompat="@drawable/ic_language" tools:ignore="RtlHardcoded" /> @@ -311,6 +317,7 @@ android:focusable="true" android:padding="@dimen/player_main_buttons_padding" android:scaleType="fitXY" + app:tint="@color/white" app:srcCompat="@drawable/ic_share" tools:ignore="RtlHardcoded" /> @@ -324,6 +331,7 @@ android:focusable="true" android:padding="@dimen/player_main_buttons_padding" android:scaleType="fitXY" + app:tint="@color/white" app:srcCompat="@drawable/ic_volume_off" tools:ignore="RtlHardcoded" /> @@ -337,6 +345,7 @@ android:padding="@dimen/player_main_buttons_padding" android:scaleType="fitCenter" android:visibility="gone" + app:tint="@color/white" app:srcCompat="@drawable/ic_fullscreen" tools:ignore="ContentDescription,RtlHardcoded" tools:visibility="visible" /> @@ -416,6 +425,7 @@ android:padding="@dimen/player_main_buttons_padding" android:scaleType="fitCenter" android:visibility="gone" + app:tint="@color/white" app:srcCompat="@drawable/ic_fullscreen" tools:ignore="ContentDescription,RtlHardcoded" tools:visibility="visible" /> @@ -439,6 +449,7 @@ android:clickable="true" android:focusable="true" android:scaleType="fitCenter" + app:tint="@color/white" app:srcCompat="@drawable/ic_previous" tools:ignore="ContentDescription" /> @@ -450,6 +461,7 @@ android:layout_weight="1" android:background="?attr/selectableItemBackgroundBorderless" android:scaleType="fitCenter" + app:tint="@color/white" app:srcCompat="@drawable/ic_pause" tools:ignore="ContentDescription" /> @@ -463,6 +475,7 @@ android:clickable="true" android:focusable="true" android:scaleType="fitCenter" + app:tint="@color/white" app:srcCompat="@drawable/ic_next" tools:ignore="ContentDescription" /> @@ -515,6 +528,7 @@ android:focusable="true" android:padding="10dp" android:scaleType="fitXY" + app:tint="@color/white" app:srcCompat="@drawable/ic_close" /> @@ -190,6 +191,7 @@ android:paddingBottom="3dp" android:scaleType="fitCenter" android:visibility="gone" + app:tint="@color/white" app:srcCompat="@drawable/ic_list" tools:ignore="ContentDescription,RtlHardcoded" /> @@ -207,6 +209,7 @@ android:paddingBottom="3dp" android:scaleType="fitCenter" android:visibility="gone" + app:tint="@color/white" app:srcCompat="@drawable/ic_format_list_numbered" tools:ignore="ContentDescription,RtlHardcoded" /> @@ -219,6 +222,7 @@ android:focusable="true" android:padding="@dimen/player_main_buttons_padding" android:scaleType="fitXY" + app:tint="@color/white" app:srcCompat="@drawable/ic_expand_more" tools:ignore="ContentDescription,RtlHardcoded" /> @@ -282,6 +286,7 @@ android:focusable="true" android:padding="@dimen/player_main_buttons_padding" android:scaleType="fitXY" + app:tint="@color/white" app:srcCompat="@drawable/ic_cast" tools:ignore="RtlHardcoded" /> @@ -296,6 +301,7 @@ android:focusable="true" android:padding="@dimen/player_main_buttons_padding" android:scaleType="fitXY" + app:tint="@color/white" app:srcCompat="@drawable/ic_language" tools:ignore="RtlHardcoded" /> @@ -310,6 +316,7 @@ android:focusable="true" android:padding="@dimen/player_main_buttons_padding" android:scaleType="fitXY" + app:tint="@color/white" app:srcCompat="@drawable/ic_share" tools:ignore="RtlHardcoded" /> @@ -323,6 +330,7 @@ android:focusable="true" android:padding="@dimen/player_main_buttons_padding" android:scaleType="fitXY" + app:tint="@color/white" app:srcCompat="@drawable/ic_volume_off" tools:ignore="RtlHardcoded" /> @@ -336,6 +344,7 @@ android:padding="@dimen/player_main_buttons_padding" android:scaleType="fitCenter" android:visibility="gone" + app:tint="@color/white" app:srcCompat="@drawable/ic_fullscreen" tools:ignore="ContentDescription,RtlHardcoded" tools:visibility="visible" /> @@ -413,6 +422,7 @@ android:padding="@dimen/player_main_buttons_padding" android:scaleType="fitCenter" android:visibility="gone" + app:tint="@color/white" app:srcCompat="@drawable/ic_fullscreen" tools:ignore="ContentDescription,RtlHardcoded" tools:visibility="visible" /> @@ -436,6 +446,7 @@ android:clickable="true" android:focusable="true" android:scaleType="fitCenter" + app:tint="@color/white" app:srcCompat="@drawable/ic_previous" tools:ignore="ContentDescription" /> @@ -447,6 +458,7 @@ android:layout_weight="1" android:background="?attr/selectableItemBackgroundBorderless" android:scaleType="fitCenter" + app:tint="@color/white" app:srcCompat="@drawable/ic_pause" tools:ignore="ContentDescription" /> @@ -460,6 +472,7 @@ android:clickable="true" android:focusable="true" android:scaleType="fitCenter" + app:tint="@color/white" app:srcCompat="@drawable/ic_next" tools:ignore="ContentDescription" /> @@ -511,6 +524,7 @@ android:focusable="true" android:padding="10dp" android:scaleType="fitXY" + app:tint="@color/white" app:srcCompat="@drawable/ic_close" />