Android does not recognize delayTouches

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
quailcreek
Posts: 746
Joined: Sun Feb 04, 2007 11:01 pm
Location: McKenna, WA

Android does not recognize delayTouches

Post by quailcreek » Mon Jun 25, 2018 10:04 pm

I'm having a bit of a problem with a scroller for a DG on Android. I think the trouble stems from Android not recognizing delayTouches in the scroller creation script.

The card script contains the scroller create code and that gets created OK.

In the "Row Template" script of the DG I have a mouseUp handler that navigates to a cd based upon the text in fld "Name" of the Row Template.

Code: Select all

on mouseUp
  local theCard
  
  put fld "Name" of me into theCard
  visual effect "scroll left" very fast
  go cd theCard
end mouseUp
Everything works fine in iOS. However, on Android, as soon as the scroll is stopped the mouseUp event is triggered and I get sent to another card. Has anybody come up with a workaround for this?

I'm using LC 8.1.0
Android Scroller Test.livecode.zip
(5.51 KiB) Downloaded 197 times
Tom
MacBook Pro OS Mojave 10.14

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7214
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Android does not recognize delayTouches

Post by jacque » Tue Jun 26, 2018 5:53 pm

I think delayedTouches is iOS only. But your issue sounds like the same problem I had with the Android field widget: https://quality.livecode.com/show_bug.cgi?id=21355

You might want to add a comment there to say the problem isn't only with the widget.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

quailcreek
Posts: 746
Joined: Sun Feb 04, 2007 11:01 pm
Location: McKenna, WA

Re: Android does not recognize delayTouches

Post by quailcreek » Tue Jun 26, 2018 9:04 pm

Thanks, Jacqueline.
Ya, I realize delayTouches is supposed to be iOS only but I believe that's what's causing this problem. I added my information to your bug report.
Tom
MacBook Pro OS Mojave 10.14

quailcreek
Posts: 746
Joined: Sun Feb 04, 2007 11:01 pm
Location: McKenna, WA

Re: Android does not recognize delayTouches

Post by quailcreek » Mon Jul 09, 2018 10:50 pm

Has anybody come up with a workaround for this? For me, at least, this essentially makes datagrids unusable on Android. All of my apps are x platform, ie the same stack for iOS and Android. All of them have multiple DGs and one has over 50.
Tom
MacBook Pro OS Mojave 10.14

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7214
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Android does not recognize delayTouches

Post by jacque » Mon Jul 09, 2018 11:08 pm

In a regular field I don't get mouseUps at all inside a native scroller. That's been an issue for a long time. I haven't tried it with a datagrid, but since you do get the mouseUp message, you could try tracking the distance between mouseDown and mouseUp and see how far apart they are. If they're more than 10 pixels or so, assume it's a scroll and don't do anything.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

quailcreek
Posts: 746
Joined: Sun Feb 04, 2007 11:01 pm
Location: McKenna, WA

Re: Android does not recognize delayTouches

Post by quailcreek » Tue Jul 10, 2018 2:01 am

Excellent idea, J!! I'll let you know how it works. Thanks!
Tom
MacBook Pro OS Mojave 10.14

quailcreek
Posts: 746
Joined: Sun Feb 04, 2007 11:01 pm
Location: McKenna, WA

Re: Android does not recognize delayTouches

Post by quailcreek » Tue Jul 10, 2018 5:21 am

That solved the problem. Thanks again J.
Tom
MacBook Pro OS Mojave 10.14

Post Reply

Return to “Android Deployment”