MaterialRadioButton

public class MaterialRadioButton


A class that creates a Material Themed RadioButton.

This class uses attributes from the Material Theme to style a RadioButton. Excepting color changes, it behaves identically to AppCompatRadioButton. Your theme's ?attr/colorControlActivated, ?attr/colorSurface, and ?attr/colorOnSurface must be set.

For more information, see the component developer guidance and design guidelines.

Summary

Public constructors

MaterialRadioButton(Context context)
MaterialRadioButton(Context context, AttributeSet attrs)
MaterialRadioButton(
    Context context,
    AttributeSet attrs,
    int defStyleAttr
)

Public methods

boolean

Returns true if this MaterialRadioButton defaults to colors from a Material Theme.

void
setUseMaterialThemeColors(boolean useMaterialThemeColors)

Forces the MaterialRadioButton to use colors from a Material Theme.

Protected methods

void

Public constructors

MaterialRadioButton

public MaterialRadioButton(Context context)

MaterialRadioButton

public MaterialRadioButton(Context context, AttributeSet attrs)

MaterialRadioButton

public MaterialRadioButton(
    Context context,
    AttributeSet attrs,
    int defStyleAttr
)

Public methods

isUseMaterialThemeColors

public boolean isUseMaterialThemeColors()

Returns true if this MaterialRadioButton defaults to colors from a Material Theme.

setUseMaterialThemeColors

public void setUseMaterialThemeColors(boolean useMaterialThemeColors)

Forces the MaterialRadioButton to use colors from a Material Theme. Overrides any specified ButtonTintList. If set to false, sets the tints to null. Use setSupportButtonTintList to change button tints.

Protected methods

onAttachedToWindow

protected void onAttachedToWindow()