open class AppCompatRadioButton : RadioButton
   ↳ android.view.View
   ↳ android.widget.TextView
   ↳ android.widget.Button
   ↳ android.widget.CompoundButton
   ↳ android.widget.RadioButton
   ↳ androidx.appcompat.widget.AppCompatRadioButton

A RadioButton 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 RadioButton 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.


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


AppCompatRadioButton(context: Context!)


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


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

Public methods


open fun setButtonDrawable(buttonDrawable: Drawable!): Unit


open fun setButtonDrawable(resId: Int): Unit


open fun getCompoundPaddingLeft(): Int