TtToast
Toasts are used to provide non-critical feedback to a user. They show a brief message with an optional action a user can take. A toast will, when requested to be shown, search for a TtToastContainer and attach itself. This search for a TtToastContainer starts from a provided View and will traverse the parents of the provided view all through the view hierarchy.
Parameters
A image to be displayed in the front of the toast. When set to null
, no drawable is shown.
The ImageType of the displayed image in front of the toast. The default value is ImageType.DEFAULT.
The primary text displayed in the toast.
The secondary text displayed in the toast.
A clickable label shown at the end of the toast. When clicked, onActionLabelClicked will be called.
The action to perform when clicked on actionLabel.
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.
Types
An interface for listeners that wish to receive a callback when a toast is dismissed.
Properties
Functions
Shows this toast by adding it to the TtToastContainer closest to view. Starting from view it will traverse the parents of the provided view all through the view hierarchy searching for the first TtToastContainer it finds.
Shows this toast by adding it to the TtToastContainer closest to the root in the view hierarchy of view. Starting from view it will traverse the parents of the provided view all through the view hierarchy searching the TtToastContainer closest to the root in the view hierarchy.