From 41c3a580eeb3abea4075c683476dbf05a0f1a597 Mon Sep 17 00:00:00 2001 From: Tiger Oakes Date: Mon, 31 Aug 2020 19:42:27 -0700 Subject: [PATCH] [fenix] Simplify media state drawables (https://github.com/mozilla-mobile/fenix/pull/13474) --- .../fenix/tabtray/TabTrayViewHolder.kt | 10 ++----- .../res/drawable/media_state_background.xml | 15 ++++++++++ .../main/res/drawable/media_state_pause.xml | 19 ++++++++++++ ...th_background.xml => media_state_play.xml} | 15 ++-------- .../res/drawable/pause_with_background.xml | 27 ----------------- .../tab_tray_pause_with_background.xml | 30 ------------------- .../tab_tray_play_with_background.xml | 30 ------------------- app/src/main/res/layout/tab_list_row.xml | 2 +- app/src/main/res/layout/tab_tray_item.xml | 2 +- 9 files changed, 41 insertions(+), 109 deletions(-) create mode 100644 app/src/main/res/drawable/media_state_background.xml create mode 100644 app/src/main/res/drawable/media_state_pause.xml rename app/src/main/res/drawable/{play_with_background.xml => media_state_play.xml} (52%) delete mode 100644 app/src/main/res/drawable/pause_with_background.xml delete mode 100644 app/src/main/res/drawable/tab_tray_pause_with_background.xml delete mode 100644 app/src/main/res/drawable/tab_tray_play_with_background.xml diff --git a/app/src/main/java/org/mozilla/fenix/tabtray/TabTrayViewHolder.kt b/app/src/main/java/org/mozilla/fenix/tabtray/TabTrayViewHolder.kt index b2aba6fef1..04c43b0cbe 100644 --- a/app/src/main/java/org/mozilla/fenix/tabtray/TabTrayViewHolder.kt +++ b/app/src/main/java/org/mozilla/fenix/tabtray/TabTrayViewHolder.kt @@ -96,10 +96,7 @@ class TabTrayViewHolder( contentDescription = context.getString(R.string.mozac_feature_media_notification_action_play) setImageDrawable( - AppCompatResources.getDrawable( - context, - R.drawable.tab_tray_play_with_background - ) + AppCompatResources.getDrawable(context, R.drawable.media_state_play) ) } @@ -108,10 +105,7 @@ class TabTrayViewHolder( contentDescription = context.getString(R.string.mozac_feature_media_notification_action_pause) setImageDrawable( - AppCompatResources.getDrawable( - context, - R.drawable.tab_tray_pause_with_background - ) + AppCompatResources.getDrawable(context, R.drawable.media_state_pause) ) } diff --git a/app/src/main/res/drawable/media_state_background.xml b/app/src/main/res/drawable/media_state_background.xml new file mode 100644 index 0000000000..1dd7ea7ee6 --- /dev/null +++ b/app/src/main/res/drawable/media_state_background.xml @@ -0,0 +1,15 @@ + + + + + + + + + diff --git a/app/src/main/res/drawable/media_state_pause.xml b/app/src/main/res/drawable/media_state_pause.xml new file mode 100644 index 0000000000..be9fe79fd4 --- /dev/null +++ b/app/src/main/res/drawable/media_state_pause.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + diff --git a/app/src/main/res/drawable/play_with_background.xml b/app/src/main/res/drawable/media_state_play.xml similarity index 52% rename from app/src/main/res/drawable/play_with_background.xml rename to app/src/main/res/drawable/media_state_play.xml index db7c29db6f..183b83bdde 100644 --- a/app/src/main/res/drawable/play_with_background.xml +++ b/app/src/main/res/drawable/media_state_play.xml @@ -3,16 +3,7 @@ - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> - - - - - - - + + android:fillColor="@color/tab_tray_item_media_stroke" + android:pathData="M10,16.363l6,-3.5c0.2,-0.12 0.36,-0.3 0.44,-0.524c0.1,-0.2 0.1,-0.46 0,-0.684c-0.1,-0.22 -0.236,-0.4 -0.44,-0.524l-6,-3.5c-0.2,-0.12 -0.44,-0.16 -0.675,-0.12c-0.23,0.04 -0.44,0.163 -0.6,0.344c-0.15,0.2 -0.234,0.4 -0.233,0.644l0,7c0,0.235 0.084,0.46 0.235,0.641c0.15,0.2 0.36,0.3 0.59,0.34c0.23,0.04 0.5,-0 0.673,-0.1Z"/> diff --git a/app/src/main/res/drawable/pause_with_background.xml b/app/src/main/res/drawable/pause_with_background.xml deleted file mode 100644 index 3df510e230..0000000000 --- a/app/src/main/res/drawable/pause_with_background.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/app/src/main/res/drawable/tab_tray_pause_with_background.xml b/app/src/main/res/drawable/tab_tray_pause_with_background.xml deleted file mode 100644 index 337bf611d5..0000000000 --- a/app/src/main/res/drawable/tab_tray_pause_with_background.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/app/src/main/res/drawable/tab_tray_play_with_background.xml b/app/src/main/res/drawable/tab_tray_play_with_background.xml deleted file mode 100644 index 3694d4c3c1..0000000000 --- a/app/src/main/res/drawable/tab_tray_play_with_background.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/app/src/main/res/layout/tab_list_row.xml b/app/src/main/res/layout/tab_list_row.xml index 47b930b01e..530278e5e9 100644 --- a/app/src/main/res/layout/tab_list_row.xml +++ b/app/src/main/res/layout/tab_list_row.xml @@ -48,7 +48,7 @@ app:layout_constraintCircleRadius="28dp" app:layout_constraintEnd_toEndOf="@id/favicon_image" app:layout_constraintTop_toTopOf="@id/favicon_image" - app:srcCompat="@drawable/pause_with_background" /> + app:srcCompat="@drawable/media_state_pause" /> + app:srcCompat="@drawable/media_state_play" />