From 220d552b023955cf91ba3341fec3cd2bb921cb56 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 9 Oct 2020 20:54:38 +0200 Subject: [PATCH] highlight the currently playing song in the queue --- .../simplemobiletools/musicplayer/adapters/QueueAdapter.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/musicplayer/adapters/QueueAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/musicplayer/adapters/QueueAdapter.kt index c935ac6e..62649a5c 100644 --- a/app/src/main/kotlin/com/simplemobiletools/musicplayer/adapters/QueueAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/musicplayer/adapters/QueueAdapter.kt @@ -14,6 +14,7 @@ import com.simplemobiletools.commons.views.MyRecyclerView import com.simplemobiletools.musicplayer.R import com.simplemobiletools.musicplayer.activities.SimpleActivity import com.simplemobiletools.musicplayer.models.Track +import com.simplemobiletools.musicplayer.services.MusicService import kotlinx.android.synthetic.main.item_track_queue.view.* import java.util.* @@ -64,7 +65,8 @@ class QueueAdapter(activity: SimpleActivity, val items: ArrayList, recycl track_queue_title.text = track.title arrayOf(track_queue_title, track_queue_duration).forEach { - it.setTextColor(textColor) + val color = if (track == MusicService.mCurrTrack) primaryColor else textColor + it.setTextColor(color) } track_queue_duration.text = track.duration.getFormattedDuration()