mieq
Mar 02, 2020 - 15:41
Does Button View support long press action? If not, very much hope to add this feature. Thanks.
Does Button View support long press action? If not, very much hope to add this feature. Thanks.
@mieq see @mikael gestures
@cvp, thought there might be some issue with the interaction of the built-in click and the added gesture, but no, works fine:
import ui
import gestures
def action(sender):
sender.title = 'Clicked'
b = ui.Button(
background_color='white',
tint_color='black',
action=action)
def longpressed(data):
if data.began:
data.view.title = 'Longpressed'
gestures.long_press(b, longpressed)
b.present('fullscreen')
@mikael I know that I have already used gestures with long press but not sure it was with a button, but I was confident 😀
@cvp Thank you!
@mieq don't thank me, but @mikael for his marvelous module 😀
@mikael Thank you! Your Modules are amazing!
@cvp Yes it's really amazing