Skip to content

Most visited

Recently visited

navigation
Added in API level 1

Checkable

public interface Checkable

android.widget.Checkable
Known Indirect Subclasses


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
boolean isChecked ()

Returns
boolean The current checked state of the view

setChecked

Added in API level 1
void setChecked (boolean checked)

Change the checked state of the view

Parameters
checked boolean: The new checked state

toggle

Added in API level 1
void toggle ()

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

This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.