I am developing a playlist app for Android which has a ListView that contains song name (TextView) as its list item.
As the song plays, i want to highlight the item in the listview until the song ends. This is to indicate which song is currently playing.
I tried setSelection API from listview but it didn’t work.
Your list item view must implement the
Checkableinterface:Then you can use
setItemChecked(int index, boolean checked)on your list.