1. The screen does not rotate
. Configure android:screenOrientation=”landscape” in the corresponding Activity in the AndroidManifest file (horizontal screen, portrait is vertical screen);
2. When the screen rotates, do not re-walk the life cycle
and configure it in the corresponding Activity in the AndroidManifest file android:configChanges="keyboardHidden|orientation|screenSize", it is best to configure all three, otherwise it cannot be adapted to all models or sdk versions.
By default, the screen rotates and goes through the lifecycle again.
Android horizontal and vertical screen switching does not re-walk the life cycle
Guess you like
Origin http://10.200.1.11:23101/article/api/json?id=326615716&siteId=291194637
Ranking