Just came to show something that really help me with this:
Everyone talks about how to use the tint and how to use the colorAccent, but, this wont work on phones with API less than 21.
So, the real fix on this or at least what helped me was to use android.support.v7.widget.AppCompatRadioButton
instead of RadioButton
With this on your layout, you can use:
app:buttonTint="@color/yourColor"
without getting warnings or problems about the compat of the view.
And, don't you forget about adding:
xmlns:app="http://schemas.android.com/apk/res-auto"
to your layout parent or to your widget.
Edit:
@aselims mention on a comment that there's not buttonTint
in the app
namespace.
So... here's my current style for this solution:
<style name="MRadioButton.Purple" parent="Widget.AppCompat.CompoundButton.RadioButton">
<item name="colorAccent">@color/youColor</item>
<item name="colorControlHighlight">@color/yourColor</item>
<item name="android:colorPressedHighlight">@color/yourColor</item>
<item name="colorPrimaryDark">@color/yourColor</item>
<item name="colorPrimary">@color/yourColor</item>
<item name="colorControlActivated">@color/yourColor</item>
</style>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…