Added in API level 1

Checkable


public interface Checkable

android.widget.Checkable
CheckBox

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

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

A button with two states, checked and 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 isChecked()
abstract void setChecked(boolean checked)

Change the checked state of the view

abstract void toggle()

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

Public methods

isChecked

Added in API level 1
public abstract boolean isChecked ()

Returns
boolean The current checked state of the view

setChecked

Added in API level 1
public abstract void setChecked (boolean checked)

Change the checked state of the view

Parameters
checked boolean: The new checked state

toggle

Added in API level 1
public abstract void toggle ()

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