Testing for Default Resources

Here's how to test whether an application includes every string resource that it needs:

1. Set the emulator or device to a language that your application does not support. For example, if the application has French strings in res/values-fr/ but does not have any Spanish strings in res/values-es/, then set the emulator's locale to Spanish. (You can use the Custom Locale application to set the emulator to an unsupported locale.)

2. Run the application.

3. If the application shows an error message and a Force Close button, it might be looking for a string that is not available. Make sure that your res/values/strings.xml file includes a definition for every string that the application uses.

If the test is successful, repeat it for other types of configurations. For example, if the application has a layout file called res/layout-land/main.xml but does not contain a file called res/layout-port/main.xml, then set the emulator or device to portrait orientation and see if the application will run.

0 0

Post a comment