我在适配器类中尝试了下面的代码,但它不起作用。
myViewHolder.cardview1.setStrokeColor(ContextCompat.getColor(context, R.color.selected_color));
xml android material-design android-cardview material-components-android
android ×1
android-cardview ×1
material-components-android ×1
material-design ×1
xml ×1