class TwoStateButton : Button (source)
An action that either shows an active button or an inactive button based on the provided isEnabled lambda.
enabledImage - The drawable to be show if the button is in the enabled stated.
enabledContentDescription - The content description to use if the button is in the enabled state.
disabledImage - The drawable to be show if the button is in the disabled stated.
disabledContentDescription - The content description to use if the button is in the enabled state.
isEnabled - Lambda that returns true of false to indicate whether this button should be enabled/disabled.
background - A custom (stateful) background drawable resource to be used.
listener - Callback that will be invoked whenever the checked state changes.
TwoStateButton(enabledImage: Drawable, enabledContentDescription: String, disabledImage: Drawable, disabledContentDescription: String, isEnabled: () -> Boolean = { true }, background: Int = 0, listener: () -> Unit)
An action that either shows an active button or an inactive button based on the provided isEnabled lambda. |
var enabled: Boolean |
val padding: Padding
a custom Padding for this Button. |
open fun bind(view: View): Unit |