为什么快速旋转屏幕180度不被视为配置更改,因此不会触发
设备:硬件Nexus 5X 平台:Android 7.1.1
清单:
Activity.onCreate()
!?所以我无法重新定位我的相机视图!如果你每次旋转90度,它都会触发配置更改。我将省略源代码,因为我的清单中没有configChanges
也没有orientation
属性。这个活动也没有什么特别的地方。似乎这是一种预期的行为,但我找不到任何官方信息。设备:硬件Nexus 5X 平台:Android 7.1.1
清单:
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="false"
android:xlargeScreens="true" />
<application
android:name="xyz.MyApp"
android:allowBackup="true"
android:backupAgent=".provider.MyBackupAgent"
android:hardwareAccelerated="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:largeHeap="true"
android:restoreAnyVersion="true"
android:theme="@style/AppTheme"
android:uiOptions="splitActionBarWhenNarrow"
tools:replace="android:icon" >
<activity android:name="xyz.MyActivity"
android:label="asdf"
android:theme="@style/Theme" />
styles.xml:
<style name="Theme" parent="Theme.AppCompat.NoActionBar">
<item name="actionBarIconColor">#fff</item>
<item name="actionBarInsetStart">@dimen/keyline_2</item>
</style>
styles-v19.xml:
<style name="Theme" parent="Theme.AppCompat.NoActionBar">
<item name="actionBarIconColor">#fff</item>
<item name="actionBarInsetStart">@dimen/keyline_2</item>
<item name="android:windowTranslucentStatus">true</item>
<item name="android:windowTranslucentNavigation">true</item>
</style>