Android exposes the "touch slop" value, which is the distance which a
touch pointer has to travel before it is considered to be a drag
event.
It is important to also consider the case where a touch pointer
wanders off to another location, and then without releasing, returns
back to the start location. In this case, you would not want to
interpret that as a "click" event.

See: 
https://developer.android.com/reference/android/view/ViewConfiguration.html#getScaledTouchSlop()


Am So., 18. Apr. 2021 um 12:57 Uhr schrieb Johan Vos <[email protected]>:
>
> I agree it's good looking at how it is done on other platforms. It's still 
> not clear to me (as in: I can't put it in an algorithm): if you say that the 
> button is "fired" only when the release location is very close to the 
> touch-start location, then it occurs to me that somehow there could have been 
> other events that caused the location to change slightly, but don't these 
> events lead to DRAG events?
> That would then contradict the second statement: whenever a drag is detected, 
> there is no button-fired action at all.
>
> -------------
>
> PR: https://git.openjdk.java.net/jfx/pull/406

Reply via email to