Alert

data class Alert(val title: String?, val message: String?, val actions: List<Alert.Action>, val textInputAction: Alert.TextInputAction? = null, val style: Alert.Style = Style.ALERT)

An object that represents an alert with title and/or message and actions (button)

Constructors

Link copied to clipboard
constructor(title: String?, message: String?, actions: List<Alert.Action>, textInputAction: Alert.TextInputAction? = null, style: Alert.Style = Style.ALERT)

Types

Link copied to clipboard
data class Action(val title: String, val style: Alert.Action.Style = Style.DEFAULT, val handler: AlertActionHandler = {})

An action that represents a button in the alert

Link copied to clipboard
class Builder(style: Alert.Style = Style.ALERT)

Builder class for creating an Alert

Link copied to clipboard

Alert style

Link copied to clipboard
data class TextInputAction(val text: String?, val placeholder: String?, val textObserver: AlertTextObserver)

An action that represents an input field in the alert and its initial state

Properties

Link copied to clipboard

The list of action objects that the user can take in response to the alert

Link copied to clipboard

The descriptive text that provides more details

Link copied to clipboard
Link copied to clipboard

The optional action object that sets the alert's input options and text change callback

Link copied to clipboard

The title of the alert