Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以使用 attrs.xml 以外的其他文件来存储一组特定的属性,例如颜色?
现在:
attrs.xml
我想分成:
attrs.xml colors.xml
是的,当然可以,只需colors.xml在values文件夹中定义 a 并将所需的颜色放在那里,如下所示:
colors.xml
values
<?xml version="1.0" encoding="utf-8"?> <resources> <color name="my_blue">#c00e</color> <color name="my_welcome_color">#3399cc</color> <color name="my_transperent_white">#afff</color> .... </resources>