[colors.xml代码在Android开发中使用jav [duplicate]

问题描述 投票:-2回答:1

[我正在尝试使用Java在Android开发中使用颜色代码,并且colors.xml中的代码更改为某些符号enter image description here

java android
1个回答
-2
投票

您的color.xml文件应如下所示:

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="colorBackground">#ffebee</color>
    <color name="colorPrimary">#3C3C3C</color>
    <color name="colorPrimaryDark">#000000</color>
    <color name="colorAccent">#ffffff</color>
</resources>

© www.soinside.com 2019 - 2024. All rights reserved.