AppCompatRadioButton
open class AppCompatRadioButton : RadioButton, TintableCompoundButton, TintableBackgroundView
kotlin.Any | ||||||
↳ | 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
andR.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.
Summary
Public constructors | |
---|---|
<init>(context: Context!, @Nullable attrs: AttributeSet?) |
|
<init>(context: Context!, @Nullable attrs: AttributeSet?, defStyleAttr: Int) |
Public methods | |
---|---|
open Int | |
open Unit |
setBackgroundDrawable(@Nullable background: Drawable?) |
open Unit |
setBackgroundResource(@DrawableRes resId: Int) |
open Unit |
setButtonDrawable(buttonDrawable: Drawable?) |
open Unit |
setButtonDrawable(@DrawableRes resId: Int) |
Protected methods | |
---|---|
open Unit |
Public constructors
<init>
AppCompatRadioButton(context: Context!)
<init>
AppCompatRadioButton(
context: Context!,
@Nullable attrs: AttributeSet?)
<init>
AppCompatRadioButton(
context: Context!,
@Nullable attrs: AttributeSet?,
defStyleAttr: Int)
Public methods
getCompoundPaddingLeft
open fun getCompoundPaddingLeft(): Int
Protected methods
drawableStateChanged
protected open fun drawableStateChanged(): Unit