Issue
Is it possible to create an Android Resource Directory that is only specific to a region?
In Android, if you want to make a Resource Directory specific to a locale, you name it in the following manner values-de
(German locale), and if you want it to be specific to a locale and region you name it like values-de-rAT
(German locale with Austrian region). In my case, I do not care about the locale and only about the region, but the following values-rAT
does not seem to be valid.
I know that I can get the region in code with getLocales(resources.configuration).get(0).country
but I was wondering if there is a way to work with resource directories too.
Solution
You can create resources for a country by using the country code qualifier: MCC or MNC. For example, mcc310
is U.S. on any carrier
Here's the link: https://developer.android.com/guide/topics/resources/providing-resources.html#AlternativeResources
Answered By - Saurabh Thorat
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.