1

I have an app which allows you to switch between 2 different languages. I do that by updating the configuration and restarting the activity:

Locale locale = new Locale(lang);
Locale.setDefault(locale);
Configuration config = new Configuration();
config.locale = locale;
language = lang;
getBaseContext().getResources().updateConfiguration(config,
            getBaseContext().getResources().getDisplayMetrics());
activity.recreate();

Now I have the problem that before switching the language the font sizes are displayed differently than after switching. See screenshots. Any ideas?

enter image description here

enter image description here

stoefln
  • 14,498
  • 18
  • 79
  • 138
  • so my understanding is for test purposes you are using only one locale and just making the config locale change and see how it is affecting the view. Correct me I am wrong? – ngoa Apr 09 '15 at 21:08
  • I think so (your question is not totally clear to me) – stoefln Apr 09 '15 at 21:21
  • Did u already check this link? If not could you look at that solution and see if that works? http://stackoverflow.com/questions/2264874/changing-locale-within-the-app-itself – ngoa Apr 09 '15 at 21:28

0 Answers0