Greetings,
In my custom list view I'm using this code to play and pause music. When the user clicks the play icon the icon changes to a pause icon so the user can pause the music. Clicking it again will make the icon a play icon.
I know what the index is for the play / pause ImageView. I want to select the correct item row in the custom list view for that index because clicking the ImageView doesn't raise _ItemClick.
In my custom list view I'm using this code to play and pause music. When the user clicks the play icon the icon changes to a pause icon so the user can pause the music. Clicking it again will make the icon a play icon.
I know what the index is for the play / pause ImageView. I want to select the correct item row in the custom list view for that index because clicking the ImageView doesn't raise _ItemClick.
B4X:
Sub ImageViewPlayPauseSong_Click
Dim ViewThatRaisedThisEvent As ImageView = Sender
If blnPlayCurrentSong Then
ViewThatRaisedThisEvent.Bitmap = LoadBitmap(File.DirAssets, "play-circle.png")
Else
ViewThatRaisedThisEvent.Bitmap = LoadBitmap(File.DirAssets, "pause-circle.png")
End If
Log("Index: " & ViewThatRaisedThisEvent.Tag)
ImageViewPlayCurrentSong_Click
End Sub
Last edited: