标签:android
之前的一个Activity的设置为android:configChanges="orientation|keyboardHidden",为保证屏幕旋转时不会重新调用各生命周期
后在修改了sdkVersion时,发现切屏时该Activity被销毁
compileSdkVersion buildToolsVersion
需要再加上ScreenSize可修复此问题
<activity
android:name=".MyApp"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|fontScale|screenSize"
android:label="@string/app_name"
android:launchMode="singleTop"
android:screenOrientation="behind"
android:theme="@style/Theme.NoTitleBar.Fullscreen.Activity.Main" >
</activity>
标签:android
原文地址:http://12301339.blog.51cto.com/12291339/1891106