外部化的Andr​​oid项目字符串 [英] Externalize strings for Android project

查看:111
本文介绍了外部化的Andr​​oid项目字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有任何Eclipse插件,需要从字符串code,并把他们的strings.xml?我发现在Eclipse中外部化字符串的功能,但我不知道如何得到它的strings.xml工作。

Is there any Eclipse plugin that takes strings from code and puts them in strings.xml? I found "Externalize strings" function in Eclipse, but I don't know how to get it to work with strings.xml.

推荐答案

使用重构在Eclipse:

Use Refactor in Eclipse:

  • 在突出显示字符串
  • 从Eclipse菜单中选择重构 - > Android的 - >提取的Andr​​oid字符串

该字符串将被移动到strings.xml中并调用的getContext()的getString(R.string.my_string)生成的。

The string will be moved to strings.xml and the call to getContext().getString(R.string.my_string) generated.

这篇关于外部化的Andr​​oid项目字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆