【发布时间】:2021-02-12 00:00:04
【问题描述】:
我有一个小问题。我使用 android studio 3.6 并实现了 androidx 库。 最低 API 级别 16。 我需要改变radioButton的颜色所以我用了这个:
AppCompatRadioButton rb = new AppCompatRadioButton(context);
rb.setSupportButtonTintList(colorStateList);
当我调用 setSupportButtonTintList 方法时,IDE 显示:
AppCompatRadioButton.setSupportButtonTintList 只能在同一个库组前缀内调用(引用 groupId=androidx.appcompat,前缀 androidx 来自 groupId=MyAppName)
【问题讨论】:
标签: android android-appcompat androidx