发布于 2021-02-25 13:43:45
请在XML中使用app:cardBackgroundColor="@color/yourColor"
或在您的java代码中card.setCardBackgroundColor(YourColor);
而不是缺省的setBackgroundColor()
更新
对于不透明度的更改android:backgroundTint="#40000000"
由
android:alpha="0.4"
https://stackoverflow.com/questions/66369508
复制相似问题