Added in API level 1

Checkable


interface Checkable
CheckedTextView

An extension to TextView that supports the Checkable interface and displays.

CompoundButton

A button with two states, checked and unchecked.

CheckBox

A checkbox is a specific type of two-states button that can be either checked or unchecked.

RadioButton

A radio button is a two-states button that can be either checked or unchecked.

Switch

A Switch is a two-state toggle widget.

ToggleButton

Displays checked/unchecked states as a button with a "light" indicator and by default accompanied with the text "ON" or "OFF".

Defines an extension for views that make them checkable.

Summary

Public methods
abstract Boolean

abstract Unit
setChecked(checked: Boolean)

Change the checked state of the view

abstract Unit

Change the checked state of the view to the inverse of its current state

Public methods

isChecked

Added in API level 1
abstract fun isChecked(): Boolean
Return
Boolean The current checked state of the view

setChecked

Added in API level 1
abstract fun setChecked(checked: Boolean): Unit

Change the checked state of the view

Parameters
checked Boolean: The new checked state

toggle

Added in API level 1
abstract fun toggle(): Unit

Change the checked state of the view to the inverse of its current state