Best practice for Android apps is to define all of the non-dynamic content in resource files. This lets you define different resource files for different languages, for example. Normally, this is just a recommendation and the Android SDK doesn't complain if you hard-code values in your layout xml. The Android source build system, however, requires that all strings be defined in a "values" resource. This is probably intended to protect system builders from accidentally leaving content in a system image that won't display in the user's chosen language. What you need to do is move those string values out of the layout and define them in For example, in res/values/string.xml:
And in your
For more details on the how and why of this, see Google's documentation on Localization in Android. |
|||
Was this post useful to you?
|