Hi, Im trying to use buttons in my Custom List View but I could not figure out how to handle the clicks, I will like to know from what item position the click come from, so I can take the action required to that item position.
Is this posible?
?? .. the downloaded class example contained a button click code.
If you have added the button in Designer to clv layout ... EventName property = Button1
B4X:
Sub Button1_Click
Dim index As Int = clv1.GetItemFromView(Sender)
Dim pnl As Panel = clv1.GetPanel(index)
Log($"Item Index = ${index} Item value = ${clv1.GetValue(index)}"$)
End Sub
If you have added the clv views in code .. ensure you have set the EventName in Button1.Initialize("Button1")