[英]android toast a Chinese message to user
基本上,我需要向用户敬酒中文消息。 但是我不知道如何实现这样的目标。 有什么解决方案可以帮助我吗?
我找到了自己的答案。 太简单了,我一开始都没有想到。 而且它始终有效。 在Android项目的res / values / string.xml下,我编辑:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="sample">中国的网页</string>
</resources>
然后,我使用以下方法从项目资源中检索字符串名称“ sample”:
this.getString(R.string.sample);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.