화면이 180도 회전하는 것이 왜 구성 변경으로 계산되지 않으므로 Activity.onCreate()
!을 (를) 트리거하지 않습니다. 그래서 나는 카메라의 방향을 바꿀 수 없다! 90도 회전하면 설정이 매번 변경됩니다. 내 매니페스트에 configChanges
이없고 orientation
속성이 있기 때문에 소스 코드를 생략합니다. 활동에는 특별한 것도 없습니다. 이것이 의도 된 동작 인 것으로 보이지만 공식 정보를 찾지 못했습니다.왜 화면의 180도 회전이 구성 변경으로 계산되지 않습니까?
장치 : 하드웨어 넥서스 5 배
플랫폼 : 안드로이드 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>
스타일-V19 .xm L : 당신은 AndroidManifest.xml
로 활동에 대한 android:screenOrientation="fullSensor"
를 지정해야합니다
<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>
을 사용할 수 있습니다 : 당신은 (180)에 의해 회전 후 뷰의 일부를 변경하려는 경우 당신은 OrientationEventListener이
샘플 사용할 수 있습니다 그것을 세로 (또는 가로)로 유지하므로 아무 것도 필요하지 않습니다. –
글쎄,하지만 그것은 카메라 미리보기 거꾸로! – WindRider