Android Question Disable User interaction on a CustomListView

Mike1970

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

B4X:
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
 

Mike1970

Well-Known Member
Licensed User
Longtime User
I solved like so:

B4X:
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
Top