PointerEventPass
-
Cmn
enum PointerEventPass : Enum
The enumeration of passes where PointerInputChange traverses up and down the UI tree.
PointerInputChanges traverse throw the hierarchy in the following passes:
-
Initial: Down the tree from ancestor to descendant. -
Main: Up the tree from descendant to ancestor. -
Final: Down the tree from ancestor to descendant.
These passes serve the following purposes:
-
Initial: Allows ancestors to consume aspects of
PointerInputChangebefore descendants. This is where, for example, a scroller may block buttons from getting tapped by other fingers once scrolling has started. -
Main: The primary pass where gesture filters should react to and consume aspects of
PointerInputChanges. This is the primary path where descendants will interact withPointerInputChanges before parents. This allows for buttons to respond to a tap before a container of the bottom to respond to a tap. -
Final: This pass is where children can learn what aspects of
PointerInputChanges were consumed by parents during theMainpass. For example, this is how a button determines that it should no longer respond to fingers lifting off of it because a parent scroller has consumed movement in aPointerInputChange.
Summary
Public functions |
||
|---|---|---|
PointerEventPass |
Returns the enum constant of this type with the specified name. |
Cmn
|
Array<PointerEventPass> |
values()Returns an array containing the constants of this enum type, in the order they're declared. |
Cmn
|
Public properties |
||
|---|---|---|
EnumEntries<PointerEventPass> |
Returns a representation of an immutable list of all enum entries, in the order they're declared. |
Cmn
|
Enum Values
Final
val PointerEventPass.Final: PointerEventPass
Initial
val PointerEventPass.Initial: PointerEventPass
Main
val PointerEventPass.Main: PointerEventPass
Public functions
valueOf
fun valueOf(value: String): PointerEventPass
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
| Throws | |
|---|---|
kotlin.IllegalArgumentException |
if this enum type has no constant with the specified name |
values
fun values(): Array<PointerEventPass>
Returns an array containing the constants of this enum type, in the order they're declared.
This method may be used to iterate over the constants.
Public properties
entries
val entries: EnumEntries<PointerEventPass>
Returns a representation of an immutable list of all enum entries, in the order they're declared.
This method may be used to iterate over the enum entries.