I have this issue in my tablet device Android 8.1. This device has natural orientation is landscape
I have 2 activity :
A is configured with fullSensor, contains a recyclerview to load items with thumbnail image
B is portrait, contain a surfaceview
<activity
android:name="com.hdq.myapp.activities.AActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.hdq.myapp.activities.BActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:screenOrientation="fullSensor"
android:theme="@style/AppTheme.NoActionBar">
Step 1 : Open activity A in landscape -> start Activity B : it rotate to portrait
Step 2 : Press Back button, it return to activity A and rotate to landscape
Step 3 : After that, it keep rotate to portrait immmdiately
Step 4 : Finally, it rotate to landscape again. 3 rotation in just 2 second
It's seem less happen out if A and B is very simple activity (no recylerview, no surfaceview). Just less than before.
This behavior is too weird and I'm not sure where it come from, maybe OS or somewhere my app. The onConfigurationdChanged() method was called 2 time. Another apps in this device are not happen like this. Do you have any idea about this? Is that a memory issue or something like that?
I update the profiler in my device :
The red one is the first normal rotation. 2 yellow ones is redundant.
This is call chart :