PdfSelectionMenuBuilderScope

class PdfSelectionMenuBuilderScope


Scope for building a selection menu in PdfViewer.

Summary

Public functions

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

Adds an item in the selection menu.

Public functions

item

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

Adds an item in the selection menu.

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 androidx.pdf.selection.SelectionMenuSession.