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.
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
Hi all, With this view, how do you keep the touched row showing as selected with a color, example: blue? I've searched the forum with no examples. There is the Table view, but I don't need any headers and therefore sorting or searching. I have 4 Labels on a Layout that will be used with the...
Thanks for your reply, the Pressed Color only change the background color for a second or so, I want the selected item to stay in that color, just to make it visibly clear what item you have selected.
The other forum post you linked me towards basically uses the same code I'm already using but it doesn't work properly, it changes the color only if I press the item for a longer period.
Thanks but now the Color never changes, it seems like the Pressed Color is overwriting the code I have in the ItemClick event, even though I've set the Alpha of the Pressed Color to 0 or set it to the predefined Transparent color.