Hi everyone,
I've started to dip my toe into mobile and although I've successfully got scrolling to work on mobile using the 'mobileControlCreate/Set' commands, the problem I'm having is that when scrolling on mobile, as soon as I touch the scrolling field , it immediately fires the handler that I've attached to each line of the scrolling list field!
I guess what I want it to do is to scroll, and then for the handler only to fire when I tap on a line. At the moment I can barely scroll due to the handler firing and sending me away from the scrolling field.
I'm struggling to find a way to get round this!
Grateful for any help or advice!
Many thanks,
Glenn
Mobile scolling problem
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Mobile scolling problem
I had the same issue with Datagrid.
Thanks to the forum, I found a way.
By using the time.
Short tap = scrolling
Long "click" = selecting
In the DG script :
Thanks to the forum, I found a way.
By using the time.
Short tap = scrolling
Long "click" = selecting
In the DG script :
Code: Select all
on mouseDown
wait 600 millisecs with messages
if the mouse is down then
put the dgHilitedLines of me into tLine
put GetDataOfLine(tLine, "id") into tID
if tID is empty then
exit to top
end if
answer "you have selected "&tID
else
pass mouseDown
end if
end mouseDown
on MouseDoubleDown
end MouseDoubleDown
Re: Mobile scolling problem
Many thanks for the advice - have just tried it and it works with my implementation as described.
I guess I just need to inform the user to give a longer tap for selecting a line item (and I also need to experiment a bit with the 'wait' message as well).
In my inital searches for a solution I could see that with commercial apps their handlers are triggered when text on the line is tapped on, rather than the following 'white space' of the line - I'm assuming that a similar action can't be handled in LC??
Thank you again for the workaround.
Kind regards,
Glenn
I guess I just need to inform the user to give a longer tap for selecting a line item (and I also need to experiment a bit with the 'wait' message as well).
In my inital searches for a solution I could see that with commercial apps their handlers are triggered when text on the line is tapped on, rather than the following 'white space' of the line - I'm assuming that a similar action can't be handled in LC??
Thank you again for the workaround.
Kind regards,
Glenn
Re: Mobile scolling problem
I hope others will join the "party".

As for the "text triggered", perhaps "ClickText" could do the job ?
https://livecode.fandom.com/wiki/ClickText
As far as Android UI is concerned, it seems that "swipe" is for scroll. And tap is to select.
https://www.justinmind.com/blog/tap-or- ... sign-with/
One way in LC described here :
http://livecode.byu.edu/mobile/gestures.php
https://livecode.com/resources/guides/m ... -features/
It would be so helpfull if one LC Android experts could create a stack with some of those "techniques", as a demo.