CopyToClipboard

data class CopyToClipboard(val label: UiText, val text: UiText, val successMessage: UiText? = null) : AboutItemAction(source)

Copies text to the system clipboard under label.

The text travels with the action so the clipboard receives exactly what the item displays, instead of a second lookup that could resolve under a different configuration. Both are UiText rather than String so a row whose value is a string resource, such as the application name, is as copyable as one holding a formatted value.

Constructors

Link copied to clipboard
constructor(label: UiText, text: UiText, successMessage: UiText? = null)

Properties

Link copied to clipboard

Clipboard entry label, also used as the copied item's name.

Link copied to clipboard

Confirmation shown once the copy succeeds. When null the screen falls back to the generic copied-to-clipboard message.

Link copied to clipboard

The exact text written to the clipboard.