From a4392de968be67f05a2eddfa897b03fbec4514b1 Mon Sep 17 00:00:00 2001 From: Arne Date: Fri, 15 Nov 2024 22:31:16 +0100 Subject: [PATCH] Improve audio player icons --- .../conversations/ui/service/AudioPlayer.java | 14 +++++++------- src/main/res/drawable/rounded_pause_36.xml | 5 +++++ src/main/res/drawable/rounded_play_arrow_36.xml | 5 +++++ 3 files changed, 17 insertions(+), 7 deletions(-) create mode 100644 src/main/res/drawable/rounded_pause_36.xml create mode 100644 src/main/res/drawable/rounded_play_arrow_36.xml diff --git a/src/main/java/eu/siacs/conversations/ui/service/AudioPlayer.java b/src/main/java/eu/siacs/conversations/ui/service/AudioPlayer.java index 95f4a54ee..b93eb9ce8 100644 --- a/src/main/java/eu/siacs/conversations/ui/service/AudioPlayer.java +++ b/src/main/java/eu/siacs/conversations/ui/service/AudioPlayer.java @@ -124,19 +124,19 @@ public class AudioPlayer final Context context = viewHolder.playPause.getContext(); if (message == currentlyPlayingMessage) { if (AudioPlayer.player != null && AudioPlayer.player.isPlaying()) { - viewHolder.playPause.setImageResource(R.drawable.ic_pause_24dp); + viewHolder.playPause.setImageResource(R.drawable.rounded_pause_36); MessageAdapter.setImageTint(viewHolder.playPause, viewHolder.bubbleColor); viewHolder.playPause.setContentDescription(context.getString(R.string.pause_audio)); viewHolder.progress.setEnabled(true); } else { viewHolder.playPause.setContentDescription(context.getString(R.string.play_audio)); - viewHolder.playPause.setImageResource(R.drawable.ic_play_arrow_24dp); + viewHolder.playPause.setImageResource(R.drawable.rounded_play_arrow_36); MessageAdapter.setImageTint(viewHolder.playPause, viewHolder.bubbleColor); viewHolder.progress.setEnabled(false); } return true; } else { - viewHolder.playPause.setImageResource(R.drawable.ic_play_arrow_24dp); + viewHolder.playPause.setImageResource(R.drawable.rounded_play_arrow_36); MessageAdapter.setImageTint(viewHolder.playPause, viewHolder.bubbleColor); viewHolder.playPause.setContentDescription(context.getString(R.string.play_audio)); viewHolder.runtime.setText(formatTime(message.getFileParams().runtime)); @@ -186,7 +186,7 @@ public class AudioPlayer player.pause(); messageAdapter.flagScreenOff(); releaseProximityWakeLock(); - viewHolder.playPause.setImageResource(R.drawable.ic_play_arrow_24dp); + viewHolder.playPause.setImageResource(R.drawable.rounded_play_arrow_36); MessageAdapter.setImageTint(viewHolder.playPause, viewHolder.bubbleColor); viewHolder.playPause.setContentDescription(context.getString(R.string.play_audio)); } else { @@ -195,7 +195,7 @@ public class AudioPlayer messageAdapter.flagScreenOn(); acquireProximityWakeLock(); this.stopRefresher(true); - viewHolder.playPause.setImageResource(R.drawable.ic_pause_24dp); + viewHolder.playPause.setImageResource(R.drawable.rounded_pause_36); MessageAdapter.setImageTint(viewHolder.playPause, viewHolder.bubbleColor); viewHolder.playPause.setContentDescription(context.getString(R.string.pause_audio)); } @@ -222,7 +222,7 @@ public class AudioPlayer messageAdapter.flagScreenOn(); acquireProximityWakeLock(); viewHolder.progress.setEnabled(true); - viewHolder.playPause.setImageResource(R.drawable.ic_pause_24dp); + viewHolder.playPause.setImageResource(R.drawable.rounded_pause_36); MessageAdapter.setImageTint(viewHolder.playPause, viewHolder.bubbleColor); viewHolder.playPause.setContentDescription( viewHolder.playPause.getContext().getString(R.string.pause_audio)); @@ -283,7 +283,7 @@ public class AudioPlayer final Message message = (Message) audioPlayer.getTag(); viewHolder.playPause.setContentDescription( viewHolder.playPause.getContext().getString(R.string.play_audio)); - viewHolder.playPause.setImageResource(R.drawable.ic_play_arrow_24dp); + viewHolder.playPause.setImageResource(R.drawable.rounded_play_arrow_36); MessageAdapter.setImageTint(viewHolder.playPause, viewHolder.bubbleColor); if (message != null) { viewHolder.runtime.setText(formatTime(message.getFileParams().runtime)); diff --git a/src/main/res/drawable/rounded_pause_36.xml b/src/main/res/drawable/rounded_pause_36.xml new file mode 100644 index 000000000..350eca222 --- /dev/null +++ b/src/main/res/drawable/rounded_pause_36.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/src/main/res/drawable/rounded_play_arrow_36.xml b/src/main/res/drawable/rounded_play_arrow_36.xml new file mode 100644 index 000000000..d8aed8ade --- /dev/null +++ b/src/main/res/drawable/rounded_play_arrow_36.xml @@ -0,0 +1,5 @@ + + + + +