Search code examples
androidorientationscreen-rotation

In Android on screen rotation activity is getting recreated, even if the rotation is prevented in the manifest on Oneplus6t(android 9)?


In Android on screen, rotation activity is getting recreated, even if the rotation is prevented in the manifest. It is only on Oneplus6t(android 9) in lower OS versions it is working fine?

<activity
        android:name="com.oracle.aconex.drawing.DrawingActivity"
        android:configChanges="orientation"
        android:exported="false"
        android:screenOrientation="fullUser"/>

Solution

  • Don't know the exact reason but when I added screenSize in the configchanges it started working in the device.

    <activity
            android:name=".drawing.DrawingActivity"
            android:configChanges="orientation|screenSize"
            android:exported="false"
            android:screenOrientation="fullUser"
           />