简体   繁体   English

为什么我的 colorPrimory 和.. 在 theme.xml 不是颜色? 打开颜色时我是初学者

[英]why are my colorPrimory and .. in theme.xml not color ? i am a begginer when I open color.xml there are purple and purple dark in my color.xml

why are my colorPrimory and.. in theme.xml not color?为什么我的 colorPrimory 和.. 在 theme.xml 不是颜色? i am a begginer when I open color.xml there are purple and purple dark in my color.xml and when I copy and paste my chosen color into color.xml from theme.xml activity_main will destroy i am a begginer when I open color.xml there are purple and purple dark in my color.xml and when I copy and paste my chosen color into color.xml from theme.xml activity_main will destroy

idk if I get it right but you should first declare your color in colors.xml and then import it to themes.xml, like this: idk,如果我做对了,但您应该首先在 colors.xml 中声明您的颜色,然后将其导入到themes.xml 中,如下所示:

in colors.xml:在 colors.xml 中:

<color name="custom_red"> #9F0F17 </color>

in themes.xml, inside the style tag在themes.xml中,在样式标签内

<item name="colorPrimary">@color/custom_red</item>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM