android:configchanges="Locale"
After you switch to settings without exiting the app, you'll see that the activity is restarted.
4.2, when the app is configured with the Configchanges locale attribute, when the app is in the background and there is no finish, if you change the language, the activity override's onconfigurationchanged function is not called at resume.
The reason is that 4.2 adds a layoutdirection attribute that, when changed, will also be a mask bit in newconfig. So Activitymanagerservice (actually in activitystack) always judges the restart when deciding whether to restart the activity. When inThe app expects things to happen when both locale and layoutdirection are added to the android:configchanges. the SDK documentation has:
"orientation" |
The screen orientation have changed-the user has rotated the device.
Note: If your application targets API level A or higher ( minSdkVersion targetSdkVersion as declared by the and attributes), then you should also D Eclare "screenSize" the configuration, because it also changes when a device switches between portrait and landscape orientations . |
But there is no explanation in the locale. There should also be a similar description in the locale.