Package icyllis.modernui.widget
Interface Checkable
- All Known Implementing Classes:
CheckBox
,CompoundButton
,MaterialCheckBox
,MaterialRadioButton
,RadioButton
,SwitchButton
public interface Checkable
Defines an extension for views that make them checkable.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Interface definition for a callback to be invoked when the checked state of a checkable view changed. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Get the current checked state of the viewvoid
setChecked
(boolean checked) Change the checked state of the viewvoid
toggle()
Change the checked state of the view to the inverse of its current state
-
Method Details
-
setChecked
void setChecked(boolean checked) Change the checked state of the view- Parameters:
checked
- The new checked state
-
isChecked
boolean isChecked()Get the current checked state of the view- Returns:
- The current checked state of the view
-
toggle
void toggle()Change the checked state of the view to the inverse of its current state
-