Improve audio player icons

This commit is contained in:
Arne 2024-11-15 22:31:16 +01:00
parent 3427c87219
commit a4392de968
3 changed files with 17 additions and 7 deletions

View file

@ -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));

View file

@ -0,0 +1,5 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="36dp" android:tint="?colorControlNormal" android:viewportHeight="960" android:viewportWidth="960" android:width="36dp">
<path android:fillColor="@android:color/white" android:pathData="M600,760Q567,760 543.5,736.5Q520,713 520,680L520,280Q520,247 543.5,223.5Q567,200 600,200L680,200Q713,200 736.5,223.5Q760,247 760,280L760,680Q760,713 736.5,736.5Q713,760 680,760L600,760ZM280,760Q247,760 223.5,736.5Q200,713 200,680L200,280Q200,247 223.5,223.5Q247,200 280,200L360,200Q393,200 416.5,223.5Q440,247 440,280L440,680Q440,713 416.5,736.5Q393,760 360,760L280,760ZM600,680L680,680L680,280L600,280L600,680ZM280,680L360,680L360,280L280,280L280,680ZM280,280L280,280L280,680L280,680L280,280ZM600,280L600,280L600,680L600,680L600,280Z"/>
</vector>

View file

@ -0,0 +1,5 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="36dp" android:tint="?colorControlNormal" android:viewportHeight="960" android:viewportWidth="960" android:width="36dp">
<path android:fillColor="@android:color/white" android:pathData="M320,687L320,273Q320,256 332,244.5Q344,233 360,233Q365,233 370.5,234.5Q376,236 381,239L707,446Q716,452 720.5,461Q725,470 725,480Q725,490 720.5,499Q716,508 707,514L381,721Q376,724 370.5,725.5Q365,727 360,727Q344,727 332,715.5Q320,704 320,687ZM400,480L400,480L400,480ZM400,614L610,480L400,346L400,614Z"/>
</vector>