Hi mot12,
  sorry not post earlier. I don't know, if you find my info still
useful ..., but

ad 1) Yes, it's my own function that check if user selected Czech or
English, so this return "cz" or "en" String.

ad 2) I didn't tried this. When user change locale in
PreferenceScreen, I force him to restart application. Changing of
application language is not a common activity, so restart is not a bad
solution I think :). But with your problem, it's relevant to my
another problem. Did you try set another locale (language) and then
rotate display? With my current solution, ActivityManager send this
event

INFO/ActivityManager(1160): Config changed: { scale=1.0 imsi=230/3
loc=en_GB touch=3 keys=2/1/1 nav=2/1 orien=2 layout=34}

and language of whole application set from my (e.g. "cz", to default
(in this case to "loc=en_GB"). I think that this is similar to your
problem. Grr ...

Hope we find any solution ...


On Feb 14, 11:45 am, mot12 <[email protected]> wrote:
> Menion,
> Ok, now I feel silly because I thought I could figure it out from your
> post.
>
> 1) Settings.getLanguage() is from your own preference settings?
> It is no android.provider.Settings, right?
>
> 2) When my app loads, I read the language preference from my own app
> preference settings and set the locale using the code you gave. Works
> great. But if I change the language preference in my settings using
> updateConfiguration, I hoped I would trigger the
> onConfigurationChanged of my main Activity. But that doesn't happen
> despite my entries "android:configChanges="locale" for the main
> activity and <uses-permission
> android:name="android.permission.CHANGE_CONFIGURATION"/> in the
> manifest.
>
> Let's say I am in the main activity. I load the locale specified in
> the settings in OnCreate. Everything is great. Now I go from there to
> a preference activity, change the desired locale, update the
> configuration via updateConfiguration and using the 'back' key I go
> back to my main activity. Instead of "onConfigurationChanged" I get
> "onResume", giving me no possibility to reload my resources.
>
> Any idea?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to