← Back to Compose UI
rawPressStartGestureFilter
Overview
Examples
Community Notes
Reacts if the first pointer input change it sees is an unconsumed down change, and if it reacts, consumes all further down changes.
This GestureDetector is not generally intended to be used directly, but is instead intended to be used as a building block to create more complex GestureDetectors.
This GestureDetector is a bit more experimental then the other GestureDetectors (the number and types of GestureDetectors is still very much a work in progress) and is intended to be a generically useful building block for more complicated GestureDetectors.
The theory is that this GestureDetector can be reused in PressIndicatorGestureDetector, and there could be a corresponding RawPressReleasedGestureDetector.
@param onPressStart Called when the first pointer "presses" on the GestureDetector. Offset is the position of that first pointer on press. @param enabled If false, this GestureDetector will effectively act as if it is not in the hierarchy. @param executionPass The PointerEventPass during which this GestureDetector will attempt to react to and consume down changes. Defaults to PointerEventPass.Main.
Overloads
rawPressStartGestureFilter
@Deprecated("Use Modifier.pointerInput{} with custom gesture detection code")
fun Modifier.rawPressStartGestureFilter(
onPressStart: (Offset) -> Unit,
enabled: Boolean = false,
executionPass: PointerEventPass = PointerEventPass.Main
)
Parameters
Name | Description |
---|---|
onPressStart | Called when the first pointer "presses" on the GestureDetector. Offset is the position of that first pointer on press. |
enabled | If false, this GestureDetector will effectively act as if it is not in the hierarchy. |
executionPass | The PointerEventPass during which this GestureDetector will attempt to react to and consume down changes. Defaults to PointerEventPass.Main |