【发布时间】:2016-12-06 14:09:01
【问题描述】:
大家好,我的一个类中有很多公共字符串,如下所示。
public String HeadlightString = "lights not satisfactory",
ReflectorString = "Reflectors and warning devices not satisfactory",
HornString = "Horn and other warnings not satisfactory",
MirrorsString = "Mirrors not satisfactory",
BrakessystemStrings = "Problem with the brakes System";
如何将它们添加到我的 string.xml 中,然后将它们调用到我的班级。这真的有助于整理我的代码。
【问题讨论】:
-
String Resources 请仔细阅读。您可以在此处找到有关您的问题的所有答案
-
不,我没有看到,谢谢@Rahil2952
-
只需打开您的
strings.xml文件并添加您的新字符串。