multiTouchSwipe
fun IndirectPointerInjectionScope.multiTouchSwipe(
curves: List<(timeMillis: Long) -> Offset>,
durationMillis: Long = 200,
keyTimes: List<Long> = emptyList(),
)
Performs a multitouch swipe gesture on nodes in the focus path.
Each pointer follows curves from 0 till durationMillis. Sampling of an event is forced at all times defined in keyTimes. The time between events is kept as close to eventPeriodMillis as possible, given the constraints.
The coordinates are NOT in the node's local coordinate system (see IndirectPointerInjectionScope.inputDeviceSize) and is usually used for focused movement (that is, a focused node would move to the next/previous focusable node in the hierarchy with a swipe).
Parameters
| curves | The functions that describe the gesture. Function i defines the position over time for pointer id i. The argument passed to each function is the time in milliseconds since the start of the swipe, and the return value is the location of that pointer at that point in time. |
| durationMillis | The duration of the gesture (default duration is 200 milliseconds) |
| keyTimes | An optional list of timestamps in milliseconds at which a move event must be sampled |
multiTouchSwipe
fun TouchInjectionScope.multiTouchSwipe(
curves: List<(timeMillis: Long) -> Offset>,
durationMillis: Long = 200,
keyTimes: List<Long> = emptyList(),
)
Performs a multi touch swipe gesture on the associated node.
Each pointer follows curves[i] from 0 till durationMillis. Sampling of an event is forced at all times defined in keyTimes. The time between events is kept as close to eventPeriodMillis as possible, given the constraints. The coordinates are in the node's local coordinate system, where (0, 0) is the top left corner of the node. The default duration is 200 milliseconds.
Parameters
| curves | The functions that describe the gesture. Function i defines the position over time for pointer id i. The argument passed to each function is the time in milliseconds since the start of the swipe, and the return value is the location of that pointer at that point in time. |
| durationMillis | The duration of the gesture |
| keyTimes | An optional list of timestamps in milliseconds at which a move event must be sampled |