Contains graphics optimized for use with Japanese.

If the application runs on a device that is configured to use Japanese, Android will load graphics from res/drawable-ja/, even if the device happens to be one that expects input from a stylus and has a QVGA low-density screen in landscape orientation.

Exception: The only qualifiers that take precedence over locale in the selection process are MCC and MNC (mobile country code and mobile network code).

Assume that you have the following situation:

• The application code calls for R.string.text a

• Two relevant resource files are available:

o res/values-mcc4 04/strings.xml, which includes text a in the application's default language, in this case English. o res/values-hi/strings.xml, which includes text a in Hindi.

• The application is running on a device that has the following configuration: o The SIM card is connected to a mobile network in India (MCC 404).

o The language is set to Hindi (hi).

Android will load text a from res/values-mcc4 04/strings.xml (in English), even if the device is configured for Hindi. That is because in the resource-selection process, Android will prefer an MCC match over a language match.

The selection process is not always as straightforward as these examples suggest. Please read How Android finds the best matching directory for a more nuanced description of the process. All the qualifiers are described and listed in order of precedence in Table 2 in the Resources document.

0 0

Post a comment