Android Question Change BG color of My own listview

Rizal Putra

Member
Licensed User
Longtime User
I'm making a my own listview, using the panel as an item.

How do I add an effect to change the background color when clicked, like a standard listview ?
 

barx

Well-Known Member
Licensed User
Longtime User
try something like (untested but you should get the idea)

B4X:
sub pnl_Touch (Action As Int, X As Float, Y As Float)

Dim mPnl as Panel

mPnl = Sender

Select Action

Case pnl.ACTION_DOWN
    pnl.color = colors.orange 'Highliightcolor

Case pnl.ACTION_UP
    pnl.color = colors.black 'normal color

End Select

end sub
 
Upvote 0
Top