Android Question Detect release event on panel

Marco Maria Vilucchi

Active Member
Licensed User
Longtime User
Hi all,
I need to manage a button that, for example, shows an image while it's pressed and hides it when it's released.
I thought of using a panel and the touch event, but I don't know how to intercept the moment when the finger is removed.
Can someone help me?
Thanks
Marcom
 

sorex

Expert
Licensed User
Longtime User
you can check the values or their 'representatives'

B4X:
Sub mypanel_Touch (Action As Int, X As Float, Y As Float)
    Select Action
        Case mypanel.ACTION_DOWN

        Case mypanel.ACTION_UP     
End Select
End Sub
 
Upvote 0
Top