1.AndroidManifest.xml设置:
android:configChanges="screenSize|smallestScreenSize|screenLayout"
android:resizeableActivity="true"
<activityandroid:name="com.xxx"android:exported="true"android:configChanges="screenSize|smallestScreenSize|screenLayout"android:resizeableActivity="true" />