How to highlight the currently playing song in a RecyclerView after returning from another Activity in Android?
I am working on an Android app using Java, and I have a RecyclerView
displaying a list of songs. When a song is selected, it starts playing, and the app navigates to a player Activity
. After returning to the original fragment with the song list, I want to highlight the currently playing song and display a playing animation (e.g., a GIF) next to it. Additionally, if another song is selected and starts playing, only the newly selected song should be highlighted, and the previous one should return to its default state.