Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
public interface

Checkable

android.widget.Checkable
Known Indirect Subclasses

Class Overview

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

public abstract boolean isChecked ()

Added in API level 1

Returns
  • The current checked state of the view

public abstract void setChecked (boolean checked)

Added in API level 1

Change the checked state of the view

Parameters
checked The new checked state

public abstract void toggle ()

Added in API level 1

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