When using eclipse to layout files, sometimes the strings of some controls are edited, and sometimes warnings such as "hardcoded string" Next ", shocould use @ string resource" are prompted, why?
<Button Android: Id = "@ + ID/button1" Android: layout_width = "118dp" Android: layout_height = "wrap_content" Android: text = "Next"/>"
Although the above method can run normally, this is not a good habit. You should set it in RES/values/strings. xml:
<? XML version = "1.0" encoding = "UTF-8"?> <Resources> <string name = "message"> next </string> </resources>
Use Android: text = "@ string/message" for reference. In this way, all changes can be implemented, which is also useful when multiple languages are supported. If you do not want to edit strings. in the XML file, click the textview item of the control in the layout box to create a new string name. in the edit box corresponding to XML, complete the content corresponding to this string.
Http://blog.csdn.net/iqv520/article/details/7579513 # ()