Package-level declarations

Types

Link copied to clipboard

A reusable button control that implements the different visual states.

Link copied to clipboard
data class TtButtonViewModel(val image: DrawableResolver? = null, val text: StringResolver? = null, val actionType: TtButton.ActionType = TtButton.DEFAULT_ACTION_TYPE, val isEnabled: Boolean = TtButton.DEFAULT_ENABLED, val isActivated: Boolean = TtButton.DEFAULT_ACTIVATED, val isVisible: Boolean = image != null || text != null, val isBadgeVisible: Boolean = TtButton.DEFAULT_BADGE_VISIBLE, val drawableTintMatchesTextColor: Boolean = TtButton.DEFAULT_DRAWABLE_TINT_MATCHES_TEXT_COLOR, @Px var imageSize: Int = 0, @IdRes val tag: Int? = null, @Px val paddingStart: Int = TtButton.NO_CUSTOM_PADDING, @Px val paddingEnd: Int = TtButton.NO_CUSTOM_PADDING, val onClick: () -> Unit = { }, val 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

Binds the given viewModel to a TtButton.