I'm trying to change the background color of the selected item in a listview (xCustomListView, to be precise).
I've tried this, but it doesn't work properly.
I've tried this, but it doesn't work properly.
B4X:
Sub lvwDecks_ItemClick (Position As Int, Value As Object)
'Restore the color of all items
For i = 0 To lvwDecks.size - 1
lvwDecks.getrawlistitem(i).color = Colors.argb(255, 60, 60, 60)
Next
'Change the color of the selected item
lvwDecks.getrawlistitem(Position).color = Colors.argb(255, 126, 180, 250)
End Sub