How we can achieve Long Press on screen and show explanation of any tile

I am building an app where I have different tiles. By default, they will be in a collapsed state but as soon as the user press that tile for long, it will expand.

How I can do this?

Thanks
Rajeev

1 Like

Hi,

we don’t have a long press event as of yet, but if you like, you could make a feature request for it. Instead you could implement collapsed and opened state with a single or double tap of the event, would this work for you?

I’m interested in the double tap, how do I go about doing that for a button?

What came to my mind was doing a timer with a page variable. When the button is clicked, if the boolean “double_tap_timer” is true, then it goes to whatever action you want (here the alert), if not, then it is set to true, and after a delay (here 500ms) set back to false.

Thank you Mevi! I’ve updated it a bit for my purpose of having both a single and double tap on the same component button.

1 Like