在 Blackberry 应用程序中存储长字符串资源

发布于 2024-12-09 03:08:29 字数 157 浏览 0 评论 0原文

为 Blackberry 应用程序存储很长的字符串资源的最佳方法是什么?仅仅在某个地方使用 static Final 变量是很难看的,因为这是一个巨大的 100 行字符串,而 Java 没有多行字符串语法。我应该将其粘贴在文本文件中并将其与我的应用程序捆绑在一起,还是有一种可接受的方法来做到这一点?

What's the best way to store a very long string resource for a Blackberry app? Just using a static final variable somewhere is ugly because this is a huge 100 line string, and Java has no multi-line string syntax. Should I just stick it in a text file and bundle that with my app, or is there an accepted way to do this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

幻想少年梦 2024-12-16 03:08:29

如果您将 Eclipse 与 Blackberry 插件一起使用,它有一个资源编辑器,您可以使用它向 Blackberry 项目添加字符串资源。然后,您可以在需要时使用 StringProvider 类在运行时加载字符串。

If you are using Eclipse with the Blackberry plugin, it has a Resource editor that you can use to add string resources to a Blackberry project. You can then load the strings at runtime when needed using the StringProvider class.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文