【问题标题】:Android cardview card turns blueAndroid cardview卡变蓝
【发布时间】:2021-08-05 21:38:59
【问题描述】:

我使用黑白作为卡片的背景颜色,但它变成了蓝色? 怎么办?

我根本没有使用任何其他颜色。enter image description here

【问题讨论】:

  • 发布您的应用主题和布局
  • 将您的 xml 代码粘贴到问题中
  • 解决了问题 self ,而不是背景颜色,我使用 imageview 为卡片着色。

标签: java android android-studio android-layout android-fragments


【解决方案1】:

使用 cardView android:background 无法正常工作。 你可以使用 app:cardBackgroundColor 来代替 Cardviews。

更改卡片视图应用的背景:cardBackgroundColor 工作正常。

谢谢。

试试这个..

【讨论】:

  • 我只使用 app:cardBackgroundColor。
【解决方案2】:

要更改卡片视图的背景颜色,您可以使用 card_view:cardBackgroundColor 谢谢

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-12-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-04-26
    • 2020-10-04
    • 1970-01-01
    相关资源
    最近更新 更多