如何在Android Studio中以特定方式编辑colors.xml
有没有可能在colors.xml中执行类似的操作 例如:如何在Android Studio中以特定方式编辑colors.xml,android,xml,android-studio,colors,Android,Xml,Android Studio,Colors,有没有可能在colors.xml中执行类似的操作 例如: //define a constants with color name and color value red = #ea1111 // and than use it like this <color name="colorPrimary">red</color> 我的问题是:我是否可以在xml中声明类似全局变量的内容,并在xml文件中的任何位置调用该变量?确定要以颜色声明它: <color name=
//define a constants with color name and color value
red = #ea1111
// and than use it like this
<color name="colorPrimary">red</color>
我的问题是:我是否可以在xml中声明类似全局变量的内容,并在xml文件中的任何位置调用该变量?确定要以颜色声明它:
<color name="colorPrimaryDark">#303F9F</color>
然后您可以像这样访问它:
<item name="colorPrimary">@color/colorPrimary</item>
666@color/撒旦?