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