2

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!?

Mohammad Abu Hmead
  • 621
  • 2
  • 7
  • 18
  • Some links which may help you: http://stackoverflow.com/questions/2264874/android-changing-locale-within-the-app-itself and http://adrianvintu.com/blogengine/post/Force-Locale-on-Android.aspx – Karthik Jan 02 '12 at 13:34
  • These solutions does not solve my problem, my problem is in the first activity which runs with the default local at the first run after each time the user force my app to close, do you have any solution? @Karthik – Mohammad Abu Hmead Jan 03 '12 at 10:20

1 Answers1

1

Create Splash Screen, I solved my issue.

Mohammad Abu Hmead
  • 621
  • 2
  • 7
  • 18