This is also due to issues raised by the SDK version. The version is more rigorous and more restrictive.
"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 . |
"screenSize" |
The current available screens size has changed. This represents a-currently available size, relative to the current aspect ratio, so would change when the US ER switches between landscape and portrait. However, if your application targets API level/lower, then your activity all handles this configuration change it Self (This configuration change does not restart your activity, even if running on an Android 3.2 or higher device).
Added in API level 13. |
So, to the effect that the SDK version 13 or more, you need to use orientation and screensize. The corresponding screen size changes when the device is switched between the screen and the other. So the correct wording in the activity configuration is
Android:configchanges= "Orientation|screensize"
At the same time, we can know screensize This configuration change does not lead to activity restart.
Android:configchanges issues that are not called