简体   繁体   English

如何在Android中使用系统字符串

[英]How to use system string in android

I want to use the system string "choose an app",and I find the id is "chooserview_choose_application". 我想使用系统字符串“选择一个应用程序”,并且发现ID为“ chooserview_choose_application”。

I use it by getResources().getString(android.R.string.activitychooserview_choose_application but show error! I can only use such as "cancle","copy","no","ok".....! Is there anyway to solve it? 我通过getResources().getString(android.R.string.activitychooserview_choose_application使用它,但显示错误!我只能使用“ cancle”,“ copy”,“ no”,“ ok” .....!反正解决了吗?

Most system resources are private and subject to change without warning. 大多数系统资源都是私有的,如有更改,恕不另行通知。 This includes the String resource you referenced. 这包括您引用的String资源。

Other resources (such as android.R.string.ok ) are public and provided by the SDK for your to use. 其他资源(例如android.R.string.ok )是公共的,由SDK提供供您使用。

All the strings that are available in the SDK are listed here . 这里列出了SDK 可用的所有字符串。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM