RFR: 8262023: Scrolled button is pressed using Monocle on Raspberry Pi with Touchscreen

Michael Strauß michaelstrau2 at gmail.com
Sun Apr 18 17:34:36 UTC 2021


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 <jvos at openjdk.java.net>:
>
> 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


More information about the openjfx-dev mailing list