1

My device system is set to Traditional Chinese.
But I want to my app default language as English.
So I use below code to set default before at first time.

    Resources res = getResources();
    Configuration config = res.getConfiguration();
    config.locale = Locale.ENGLISH;
    DisplayMetrics dm = res.getDisplayMetrics();
    res.updateConfiguration(config, dm);

But it still show Traditional Chinese but not English.
How can I modify?

brian
  • 6,684
  • 28
  • 81
  • 122

1 Answers1

3

Add the following in the AndroidManifest.xml for every activity

android:configChanges="locale"

source

Community
  • 1
  • 1
Armanoide
  • 1,250
  • 14
  • 30