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

DelayUpMessage

enum class DelayUpMessage
kotlin.Any
   ↳ kotlin.Enum<androidx.compose.ui.gesture.customevents.DelayUpMessage>
   ↳ androidx.compose.ui.gesture.customevents.DelayUpMessage

The types of messages that can be dispatched.

Summary

Enum values

Reports that future "up events" should not result in any normally related callbacks at this time.

Reports that previously delayed "up events" have been consumed by another PointerInputFilter and thus the receiving PointerInputFilter should not fire any associated callbacks.

Reports that a receiver can now respond to previously delayed up events.

Inherited extension functions
From androidx.core.util
infix Range<T>
T.rangeTo(that: T)

Creates a range from this Comparable value to that.

Enum values

DelayUp

enum val DelayUp : DelayUpMessage

Reports that future "up events" should not result in any normally related callbacks at this time.

When a PointerInputFilter dispatches this message, it must later dispatch DelayedUpConsumed or DelayedUpNotConsumed, even when it is about to be removed from the hierarchy.

As an example of how this works in practice. When a DoubleTapGestureFilter sees the last finger leave the screen, it dispatches this message. When TapGestureFilter receives this message, it knows not to fire its TapGestureFilter.onTap callback when it later also sees the last finger leave the screen.

DelayedUpConsumed

enum val DelayedUpConsumed : DelayUpMessage

Reports that previously delayed "up events" have been consumed by another PointerInputFilter and thus the receiving PointerInputFilter should not fire any associated callbacks.

When this message is received, the delaying relationship is concluded and the next message that can be sent is DelayUp.

Continuing the example above, if a new finger "touches" the DoubleTapGestureFilter before a timer expires, DoubleTapGestureFilter will dispatch this message so that TapGestureFilter knows to stop waiting to possibly call TapGestureFilter.onTap.

DelayedUpNotConsumed

enum val DelayedUpNotConsumed : DelayUpMessage

Reports that a receiver can now respond to previously delayed up events.

If a receiver does so, they must change the message to DelayedUpConsumed so that when the associated DelayUpEvent is dispatched to other future PointerInputFilters, they don't also respond to the delayed event.

When this message is received, the delaying relationship is concluded and the next message that can be sent is DelayUp.

Continuing the example above, if a timer expires before a new finger "touches" the DoubleTapGestureFilter, it will dispatch this message such that TapGestureFilter will know it can fire its TapGestureFilter.onTap callback. When it does so, it should change the message to DelayedUpConsumed so that any other possible PointerInputFilters will not fire their callbacks associated with the "up" event.