SelectionMenuComponent


class SelectionMenuComponent : ContextMenuComponent


Represents a clickable item with a label in a selection menu.

Summary

Public constructors

SelectionMenuComponent(
    key: Any,
    label: String,
    contentDescription: String?,
    onClick: SelectionMenuSession.() -> Unit
)

Public properties

String?

An optional accessibility description for screen readers.

String

The text to display for this menu item.

SelectionMenuSession.() -> Unit

A lambda function invoked when the item is clicked, providing access to the SelectionMenuSession.

Inherited properties

From androidx.pdf.selection.ContextMenuComponent
Any

A unique identifier for this component within its context menu.

Public constructors

SelectionMenuComponent

Added in 1.0.0-alpha11
SelectionMenuComponent(
    key: Any,
    label: String,
    contentDescription: String?,
    onClick: SelectionMenuSession.() -> Unit
)
Parameters
key: Any

A unique identifier for this component.

label: String

The text to display for this menu item.

contentDescription: String?

An optional accessibility description for screen readers.

onClick: SelectionMenuSession.() -> Unit

A lambda function invoked when the item is clicked, providing access to the SelectionMenuSession.

Public properties

contentDescription

Added in 1.0.0-alpha11
val contentDescriptionString?

An optional accessibility description for screen readers.

label

Added in 1.0.0-alpha11
val labelString

The text to display for this menu item.

onClick

Added in 1.0.0-alpha11
val onClickSelectionMenuSession.() -> Unit

A lambda function invoked when the item is clicked, providing access to the SelectionMenuSession.