hi I have a button which when (pressed) clicked will fire off another activity. I also have a SimpleOnGestureListener listening for a slide across the button which when detected will invoke another button on the screen.
The original problem I had is when the user stopped sliding their finger the onClick of the button will fire off (by detecting an onclick). I put a boolean check in place, so when slide is detected I set this to false, which onclick checks against. I then reset this boolean at the end of the onclick process.
this means in short…
press finger
detect slide
set onClick to Disable
Slide finish
Finger Off
Onclick triggered
ignore all code, and set onclick to Enable.
Now the problem I have is that onclick doesn’t always fire off, so sometimes there is a problem with false still being set as the slide is being picked up but the onclick isnt’
can I detect a finger off at the end of a slide or indeed the end of a slide so I can reset my boolean?
I have seen things like ACTION_UP but have no idea how to use that to set my boolean variable?
Cheers for your help.
You will have a method to detect touch like onTouchEvent(MotionEvent event) in that check for the action which triggered the event like this..