Package com.tomtom.tools.android.api.uicontrols.button

Types

Link copied to clipboard
class TtButton : AppCompatButton, OnDisabledClickListenerOwner

A reusable button control that implements the different visual states.

Link copied to clipboard
data class TtButtonViewModel(image: DrawableResolver?, text: StringResolver?, actionType: TtButton.ActionType, isEnabled: Boolean, isActivated: Boolean, isVisible: Boolean, isBadgeVisible: Boolean, drawableTintMatchesTextColor: Boolean, @IdRes tag: Int?, onClick: () -> Unit, onClickWhileDisabled: () -> Unit) : VisibilityProvider

Convenience class to provide common properties for buttons with a single reference. In addition to the look & feel of the button (such as image, text, actionType, etc.) and its behavior (such as onClick), it supports specifying a custom tag that makes it easily identifiable in tests.

Functions

Link copied to clipboard
fun TtButton.setViewModel(viewModel: TtButtonViewModel?)

Binds the given viewModel to a TtButton.