Added in API level 1

CompoundButton


abstract class CompoundButton : Button, Checkable
kotlin.Any
   ↳ android.view.View
   ↳ android.widget.TextView
   ↳ android.widget.Button
   ↳ android.widget.CompoundButton

A button with two states, checked and unchecked. When the button is pressed or clicked, the state changes automatically.

XML attributes

See CompoundButton Attributes, Button, TextView Attributes, View Attributes

Summary

Nested classes
abstract

Interface definition for a callback to be invoked when the checked state of a compound button changed.

Inherited XML attributes
Inherited constants
Public constructors

CompoundButton(context: Context!, attrs: AttributeSet!)

CompoundButton(context: Context!, attrs: AttributeSet!, defStyleAttr: Int)

CompoundButton(context: Context!, attrs: AttributeSet!, defStyleAttr: Int, defStyleRes: Int)

Public methods
open Unit

open Unit

open CharSequence!

open Int

Describes the autofill type of this view, so an android.service.autofill.AutofillService can create the proper AutofillValue when autofilling the view.

open AutofillValue?

open Drawable?

open BlendMode?

open ColorStateList?

open PorterDuff.Mode?

open Int

open Int

open Boolean

open Unit

open Unit

open Parcelable?

open Boolean

open Unit

Sets a drawable as the compound button image.

open Unit

Sets a drawable as the compound button image given its resource identifier.

open Unit

Sets the button of this CompoundButton to the specified Icon.

open Unit

Specifies the blending mode used to apply the tint specified by setButtonTintList(android.content.res.ColorStateList)} to the button drawable.

open Unit

Applies a tint to the button drawable.

open Unit

Specifies the blending mode used to apply the tint specified by setButtonTintList(android.content.res.ColorStateList)} to the button drawable.

open Unit
setChecked(checked: Boolean)

Changes the checked state of this button.

open Unit

Register a callback to be invoked when the checked state of this button changes.

open Unit
setStateDescription(stateDescription: CharSequence?)

This function is called when an instance or subclass sets the state description.

open Unit

Protected methods
open Unit

open IntArray!

open Unit
onDraw(canvas: Canvas)

open Boolean

If your view subclass is displaying its own Drawable objects, it should override this function and return true for any Drawable it is displaying.

Inherited functions