Google is committed to advancing racial equity for Black communities. See how.

CustomEventDispatcher

interface CustomEventDispatcher
androidx.ui.core.CustomEventDispatcher

Defines the interface that is used to dispatch CustomEvents to pointer input nodes across the compose tree.

Summary

Public methods
abstract Unit

Dispatches the event to all other pointer input nodes that share associated PointerIds with the pointer input node doing the dispatching.

abstract Unit

Arranges to release any hit paths associated with the provided pointerIds such that if they will be requested to be removed in the future, they will be removed upon request.

abstract Unit

Arranges to retain the hit paths associated with the provided pointerIds such that if they are requested to be removed for any reason, they are retained.

Public methods

dispatchCustomEvent

abstract fun dispatchCustomEvent(event: CustomEvent): Unit

Dispatches the event to all other pointer input nodes that share associated PointerIds with the pointer input node doing the dispatching.

Parameters
event: CustomEvent The CustomEvent to dispatch.

releaseHitPaths

abstract fun releaseHitPaths(pointerIds: Set<PointerId>): Unit

Arranges to release any hit paths associated with the provided pointerIds such that if they will be requested to be removed in the future, they will be removed upon request.

If they were already requested to be removed while they were retained, they will be removed immediately upon release.

retainHitPaths

abstract fun retainHitPaths(pointerIds: Set<PointerId>): Unit

Arranges to retain the hit paths associated with the provided pointerIds such that if they are requested to be removed for any reason, they are retained.

For example, this is useful when a pointer input filter wants to be able to send future custom messages to a another after the pointer has actually be released from the screen (such as in the case where a Double Tap gesture detector may want to delay a Single Tap gesture detector from firing but later may allow it to do so even after the pointer associated with the Single Tap Gesture detector no longer exists.