The second Android 11 Developer Preview is now available, test it out and share your feedback.

AnchorInfo

@Immutable data class AnchorInfo
kotlin.Any
   ↳ androidx.ui.core.selection.Selection.AnchorInfo

Contains information about an anchor (start/end) of selection.

Summary

Public constructors

<init>(direction: TextDirection, offset: Int, selectable: Selectable)

Contains information about an anchor (start/end) of selection.

Properties

TextDirection

Text direction of the character in selection edge.

Int

Character offset for the selection edge.

Selectable

The Selectable which contains this Selection Anchor.

Public constructors

<init>

AnchorInfo(
    direction: TextDirection,
    offset: Int,
    selectable: Selectable)

Contains information about an anchor (start/end) of selection.

Properties

direction

val direction: TextDirection

Text direction of the character in selection edge.

offset

val offset: Int

Character offset for the selection edge. This offset is within individual child text composable.

selectable

val selectable: Selectable

The Selectable which contains this Selection Anchor.