Builder

class Builder

This class is used to construct TtToast objects.

Properties

Link copied to clipboard
var actionLabel: StringResolver? = null

A clickable label shown at the end of the toast. When clicked, onActionLabelClicked will be called.

Link copied to clipboard
var dismissesAfterTimeout: Boolean = true

If true the toast will be dismissed after showing for a brief period of time. If false the toast will not be dismissed automatically, requiring either the user or the component showing it to dismiss it manually.

Link copied to clipboard
var image: DrawableResolver? = null

A image to be displayed in the front of the toast. When set to null, no drawable is shown.

Link copied to clipboard
var imageType: ImageType

The ImageType of the displayed image in front of the toast. The default value is ImageType.DEFAULT.

Link copied to clipboard
var onActionLabelClicked: (toast: TtToast) -> Unit? = null

The action to perform when clicked on actionLabel.

Link copied to clipboard
var primaryText: StringResolver? = null

The primary text displayed in the toast.

Link copied to clipboard
var secondaryText: StringResolver? = null

The secondary text displayed in the toast.