Java android.widget ToggleButton fields, constructors, methods, implement or subclass

Example usage for Java android.widget ToggleButton fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.widget ToggleButton.

The text is from its open source code.

Subclass

android.widget.ToggleButton has subclasses.
Click this link to see all its subclasses.

Constructor

Method

booleanisChecked()
booleanperformClick()
voidsetBackgroundDrawable(Drawable d)
voidsetChecked(boolean checked)
voidsetOnCheckedChangeListener(@Nullable OnCheckedChangeListener listener)
Register a callback to be invoked when the checked state of this button changes.
voidsetTextOff(CharSequence textOff)
Sets the text for when the button is not in the checked state.
voidsetTextOn(CharSequence textOn)
Sets the text for when the button is in the checked state.