Most visited

Recently visited

Added in API level 1

Checkable

public interface Checkable

android.widget.Checkable
Known Indirect Subclasses


定义使它们可检查的视图的扩展。

Summary

Public methods

abstract boolean isChecked()
abstract void setChecked(boolean checked)

更改视图的选中状态

abstract void toggle()

将视图的选中状态更改为当前状态的反转状态

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)

更改视图的选中状态

Parameters
checked boolean: The new checked state

toggle

Added in API level 1
void toggle ()

将视图的选中状态更改为当前状态的反转状态

Hooray!