Toggle
@CarProtocol
class Toggle
Represents a toggle that can have either a checked or unchecked state.
Toggles are allowed in Map and Pane templates from API >= 6. Old hosts may render bad UI if the toggles are added to hosts that don't support them.
Summary
Nested types |
|---|
class Toggle.BuilderA builder of |
interface Toggle.OnCheckedChangeListenerA listener for handling checked state change events. |
Public functions |
|
|---|---|
Boolean |
|
OnCheckedChangeDelegate |
Returns the |
Int |
hashCode() |
Boolean |
Returns |
Boolean |
@RequiresCarApi(value = 5)Returns |
String |
toString() |
Public functions
getOnCheckedChangeDelegate
fun getOnCheckedChangeDelegate(): OnCheckedChangeDelegate
Returns the OnCheckedChangeDelegate that is called when the checked state of the Toggle is changed.
isEnabled
@RequiresCarApi(value = 5)
fun isEnabled(): Boolean
Returns true if the toggle is enabled.