Reputation: 373
i'm in my app, one activity is opened. I press home button and change language, from taskmanager opens my app. Problem: my activity layout is getting wide.
changes in androidmanifest corresponding to that activity:
Note: If i add locale in android manifest, layout is proper, but language is not getting updated immediately. User have to close that activity and then restart, only then language is getting updated.
Please provide me your inputs.
Upvotes: 1
Views: 4476
Reputation: 48871
As mentioned in the comment on your question, it is normal behaviour.
A change in Locale is considered a change of Configuration the same as a change in orientation etc.
You need to override onConfigurationChanged in your Activity
and reload everything from there.
NOTE: You will also need to specify android:configChanges="locale"
in the Activity
declaration in the AndroidManifest
file.
Upvotes: 3