🌈 Create new beautiful Compose Gradients with our new wesite ->
Function

IndirectPointerEvent

Create a IndirectPointerEvent for test use cases.

IndirectPointerEvent

Source set: Android
public fun IndirectPointerEvent(
    changes: List<IndirectPointerInputChange>,
    type: IndirectPointerEventType,
    primaryDirectionalMotionAxis: IndirectPointerEventPrimaryDirectionalMotionAxis,
    motionEvent: MotionEvent,
): IndirectPointerEvent

Create a IndirectPointerEvent for test use cases. In most cases, you should receive an IndirectPointerEvent from the system through IndirectPointerInputModifierNode.

If you need to test indirect pointer events, use SemanticsNodeInteractionsProvider.sendIndirectPointerInput() where you do not need to manually create IndirectPointerEvents (instead calling higher-level functions).

Parameters

changes A list of IndirectPointerInputChange associated with the event
type Indicates the reason that the IndirectPointerEvent was sent.
primaryDirectionalMotionAxis Primary directional motion axis for testing.
motionEvent The MotionEvent to convert to an IndirectPointerEvent.

Content updated: