Android Question Backcolor item in ListView

ciginfo

Well-Known Member
Licensed User
Longtime User
hello,
With ListView or CustomListview I want the backcolor Item change when I click on. Is it possible? Or is there another wiew which can do it?
Thank you
 

eurojam

Well-Known Member
Licensed User
Longtime User
you can do this with the customlistview. add this event to it:
B4X:
Sub clv_panel_Click
'clv is your customlistview and then on each clickevent a random color will be added
    Log(Sender)
    Dim p As Panel
    p = Sender
       Dim r As Int = Rnd(0,255)
    Dim g As Int = Rnd(0,255)
    Dim b As Int = Rnd(0,255)
    p.Color = Colors.RGB(r,g,b)
End Sub
 
Upvote 0
Top