Mohammad Abu Hmead
Mohammad Abu Hmead

Reputation: 621

Android : changing Locale within the app itself does not affect the first run

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

Answers (1)

Mohammad Abu Hmead
Mohammad Abu Hmead

Reputation: 621

Create Splash Screen, I solved my issue.

Upvotes: 1

Related Questions