Activity Rotating Itself And Back To Normal In Android 8.1
My App is running fine for all the android version but I have noticed that in Android 8.1.0 (Oreo) when I go the screen from portrait activity to landscape activity and when I pres
Solution 1:
We also faced the same issue with Oreo. We actually can't triggered why its happening with the specific OS version. But we do had a solution to cater this problem. You can add force Orientation to portrait when finishing your landscape activity. add this this with onBackPressed() methond in ProgrammeActivity.
@Override
public void onBackPressed() {
super.onBackPressed();
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
}
this should solve this abnormal behavior :)
Post a Comment for "Activity Rotating Itself And Back To Normal In Android 8.1"