Android horizontal and vertical screen causes restart

I received an SDK a while ago, and when I log in to my account, it will be reinitialized and the activity will be restarted. I have been looking for this problem for several days. After the guidance of the great god, it is confirmed that it is caused by the problem of horizontal and vertical screens.

solution:

Add in the activity startup component: android:configChanges="orientation|keyboardHidden|screenSize" 

And set the horizontal and vertical screen to start the game android:screenOrientation="landscape" (this is a horizontal screen, the vertical screen value is "portrait")

Guess you like

Origin blog.csdn.net/Fivelin/article/details/104652766