mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-05 12:35:42 +00:00
test(input): inject two-finger gestures in the pen routing setup through a shared helper
This commit is contained in:
1 parent
6f04166dbd
commit
00a11444d1
3 files changed
+14
-8
No files matched your search
@@ -0,0 +1,12 @@
|
||||
package com.droiddeck.launcher.input
|
||||
|
||||
import android.view.MotionEvent
|
||||
|
||||
internal fun inertTwoFingerGestures() = TwoFingerGestures(16f, object : TwoFingerGestures.Listener {
|
||||
override fun cancelTouch() {}
|
||||
override fun replay(event: MotionEvent) {}
|
||||
override fun rightClick(x: Float, y: Float) {}
|
||||
override fun scrollStart(x: Float, y: Float) {}
|
||||
override fun scroll(dx: Float, dy: Float) {}
|
||||
override fun scrollEnd() {}
|
||||
})
|
||||
@@ -228,14 +228,7 @@ class SessionGestureRoutingTest {
|
||||
override fun cancel() {}
|
||||
}).also { it.configure(config) }
|
||||
setField("directTouchHold", directHold)
|
||||
setField("twoFingerGestures", TwoFingerGestures(16f, object : TwoFingerGestures.Listener {
|
||||
override fun cancelTouch() {}
|
||||
override fun replay(event: MotionEvent) {}
|
||||
override fun rightClick(x: Float, y: Float) {}
|
||||
override fun scrollStart(x: Float, y: Float) {}
|
||||
override fun scroll(dx: Float, dy: Float) {}
|
||||
override fun scrollEnd() {}
|
||||
}))
|
||||
setField("twoFingerGestures", inertTwoFingerGestures())
|
||||
launcherScroll = ScrollTouchGestures(8f, 50f, object : ScrollTouchGestures.Listener {
|
||||
override fun onMove(x: Float, y: Float) { scrollPositions += x to y }
|
||||
override fun onButton(button: Int, pressed: Boolean) {}
|
||||
|
||||
@@ -360,6 +360,7 @@ class SessionPenRoutingTest {
|
||||
field("routedTouchMode", SessionPrefs.TOUCH_DIRECT)
|
||||
field("padMouseCheckedAt", android.os.SystemClock.uptimeMillis())
|
||||
field("threeFingerTap", ThreeFingerTap(8f))
|
||||
field("twoFingerGestures", inertTwoFingerGestures())
|
||||
field("directTouchHold", DirectTouchHold(8f, object : PointerGestures.Listener {
|
||||
override fun onMove(x: Float, y: Float) {}
|
||||
override fun onButton(button: Int, pressed: Boolean, x: Float, y: Float) {}
|
||||
|
||||
Reference in new issue
Block a user