AppCompatCheckBox

open class AppCompatCheckBox : CheckBox
kotlin.Any
   ↳ android.view.View
   ↳ android.widget.TextView
   ↳ android.widget.Button
   ↳ android.widget.CompoundButton
   ↳ android.widget.CheckBox
   ↳ androidx.appcompat.widget.AppCompatCheckBox

A CheckBox which supports compatible features on older versions of the platform, including:

  • Allows dynamic tint of its background via the background tint methods in androidx.core.widget.CompoundButtonCompat.
  • Allows setting of the background tint using R.attr#buttonTint and R.attr#buttonTintMode.

This will automatically be used when you use CheckBox in your layouts and the top-level activity / dialog is provided by appcompat. You should only need to manually use this class when writing custom views.

Summary

Public constructors
<init>(context: Context!)

<init>(context: Context!, attrs: AttributeSet!)

<init>(context: Context!, attrs: AttributeSet!, defStyleAttr: Int)

Public methods
open Unit
setButtonDrawable(buttonDrawable: Drawable!)

open Unit

open Int

Public constructors

<init>

AppCompatCheckBox(context: Context!)

<init>

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

<init>

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

Public methods

setButtonDrawable

open fun setButtonDrawable(buttonDrawable: Drawable!): Unit

setButtonDrawable

open fun setButtonDrawable(resId: Int): Unit

getCompoundPaddingLeft

open fun getCompoundPaddingLeft(): Int