Reputation: 621
I use the code bellow
Locale locale = new Locale("ar");
Locale.setDefault(locale);
Configuration config = new Configuration();
config.locale = locale;
context.getResources().updateConfiguration(config,
context.getResources().getDisplayMetrics())
before setContentView in my main Activity , but the first run of the app it appears with the device local, when i rotate the app, it appears in the selected lang. can you help, tell me where is my wrong!?
Upvotes: 2
Views: 530