Package-level declarations

Types

Link copied to clipboard
class 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.

Link copied to clipboard
class TtToastContainer @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = CoreThemeR.attr.tt_toastcontainer_style) : FrameLayout

A container for TtToasts, used when calling TtToast.show.

Functions

Link copied to clipboard
fun TtToastContainer.setToastMarginReference(referenceView: View?, @Px offset: Float? = null)

Sets the toast margins of a TtToastContainer to match the bounds of the descendant referenceView. This is useful when a toast container has to show toasts of various independent descendant views relative to a specific view. offset can be used to apply a margin within the bounds of the reference view.