R.string.value帮助Android的通知 [英] R.string.value Help android notification
本文介绍了R.string.value帮助Android的通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
最新成交与
CharSequence contentTitle = R.string.value;
误差不能从int到CharSequence的转换。有没有解决的办法还是我失去了一些东西? 我试图
Error cannot convert from int to CharSequence. Is there a way around this or am i missing something? i tried
String s = R.string.value + "";
CharSequence contentTitle = s;
返回整数值。 任何帮助?
it returns integers values. Any help?
推荐答案
R.string.value
是R级调用静态字段,这是自通过Eclipse和它确实是一种所有的资源,汇总生成。要获取字符串,您需要使用:
R.string.value
is a call to the static field in the class R, which is auto generated by Eclipse and which does a kind of summary of all your resources. To retrieve the string, you need to use :
CharSequence contentTitle = getString(R.string.value);
如果你打开R类,你会看到,它仅包含引用您的项目的已编译的资源数量。
If you open the R class you will see that it contains only numbers that are references to the compiled resources of your project.
这篇关于R.string.value帮助Android的通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文