Button

data class Button(val actionId: String, val id: Int, val contentDescription: String, val icon: ToolbarIcon, val state: ToolbarItemState = ToolbarItemState.Default, val position: ToolbarItem.ItemEdge = ItemEdge.Start) : ToolbarItem

A simple tappable toolbar button.

Constructors

Link copied to clipboard
constructor(actionId: String, id: Int, contentDescription: String, icon: ToolbarIcon, state: ToolbarItemState = ToolbarItemState.Default, position: ToolbarItem.ItemEdge = ItemEdge.Start)

Properties

Link copied to clipboard
open override val actionId: String

Stable string identifier used for action dispatch and state save/restore.

Link copied to clipboard
open override val contentDescription: String

Accessibility label and overflow-menu text for this item.

Link copied to clipboard
open override val icon: ToolbarIcon

How this item renders its icon.

Link copied to clipboard
@get:IdRes
open override val id: Int

Resource id (R.id.pspdf__menu_option_*) preserving the legacy test identity of this item.

Link copied to clipboard
open override val position: ToolbarItem.ItemEdge

Which edge of the toolbar this item is grouped against.

Link copied to clipboard
open override val state: ToolbarItemState

Per-item dynamic state (enabled / selected / visible).