Android Swipe motions - Solved

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
DR White
Posts: 718
Joined: Fri Aug 23, 2013 12:29 pm

Android Swipe motions - Solved

Post by DR White » Wed Oct 14, 2015 11:15 am

Can someone show me how to detect on an Android:

swipe right
swipe left
swipe up
swipe down

Thanks,

David
Last edited by DR White on Thu Oct 15, 2015 2:12 am, edited 1 time in total.

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: Android Swipe motions

Post by jmburnod » Wed Oct 14, 2015 12:24 pm

Hi David,
I haven't got experience with android but I think that is the same as iOS.
I use something like this :

Code: Select all

--•• swipe horizontal
local sMslMdX

on mousedown
   put the mouseh into sMslMdX
end mousedown

on mouseup
      get the mouseh
   if it-80 > sMslMdX then
      --doMyGoLeft -- or what you want
   end if
   if it + 80 < sMslMdX then
      --doMyGoRight -- or what you want
   end if
end mouseup

on mouserelease
   mouseup
end mouserelease
Best regards
Jean-Marc
https://alternatic.ch

DR White
Posts: 718
Joined: Fri Aug 23, 2013 12:29 pm

Re: Android Swipe motions - Solved

Post by DR White » Thu Oct 15, 2015 2:11 am

Jean-Marc,

That works GREAT!!!

Thanks SOO MUCH,

David

Post Reply