android.widget
public
interface
android.widget.Checkable
Defines an extension for views that make them checkable.
Known Indirect Subclasses
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. |
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. |
ToggleButton |
ToggleButton is a widget that displays checked/unchecked states as a button
with a "light" indicator and by default accompanied with the text "ON" or "OFF". |
Summary
Details
Public Methods
public
boolean
isChecked()
Returns
- The current checked state of the view
public
void
setChecked(boolean checked)
Change the checked state of the view
Parameters
checked
| The new checked state
|
public
void
toggle()
Change the checked state of the view to the inverse of its current state