Package com.tomtom.tools.android.api.uicontrols.toast
Types
Link copied to clipboard
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?, defStyleAttr: Int) : FrameLayout
Content copied to clipboard
A container for TtToasts, used when calling TtToast.show.
Functions
Link copied to clipboard
fun TtToastContainer.setToastMarginReference(referenceView: View?, @Px offset: Float? = null)
Content copied to clipboard
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.