Android Question Disable User interaction on a CustomListView


Well-Known Member
Licensed User
Hi everyone, how can i disable the "click" on the various items in my customlistview?
in B4i it's done like so:

Dim p As Panel = clv.AsView
p.UserInteractionEnabled = False

But in B4A i didn't find anything like this. Even if I remove the check from "Enabled" in the designer, the items are still clickable

Thanks in advance


Well-Known Member
Licensed User
I solved like so:

Sub clvMode_ItemClick (Index As Int, Value As Object)
    If Not(ClvModeClicked) Then
        ClvModeClicked = True
        '... Do Stuff with sleep etc...'
        ClvModeClicked = False
    End If
End Sub

So if i tap more times quickly the items in the clv, until the code in the function is running, those are ignored thanks to the "clvModeClicked" variabile

P.S. the variabile is initiliazed to False in the Globals
Upvote 0