Locale not set Programatically in Android 5.0 Lollipop -


my application set locale according selected language in application. kitkat code works fine. after update lollipop locale not set. here paste code set locale..

locale locale = new locale("de_de"); locale.setdefault(locale); configuration config = new configuration(); config.locale = locale; getbasecontext().getresources().updateconfiguration(config, null); 

you have change way of locale initialization. this:

locale locale = new locale("de_de"); 

to this:

string language = "de"; string country = "de"; locale locale = new locale(language , country); 

check out full response here https://stackoverflow.com/a/27490553/2659558

cheers!


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -