When rotating phone 180 degree onConfigurationChanged Callback is not called, only works when changing rotation from portrait to landscape and vice verse, however rotating 180 degree when on landscape view is rotated however onConfigurationChanged callback is not called. How to handle 180 rotating.
my Manifest
<activity
android:name="com.myApp.Activity"
android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"/>
my Activity
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
Toast.makeText(this, "rotated", Toast.LENGTH_SHORT).show();
}
The default
screenOrientationmode behavior is vendor and device specific. For phones, it's typical that only -90°, 0° and 90° are supported.To support all orientations, add
android:screenOrientation="fullSensor"to your activity's manifest entry.Docs: https://developer.android.com/guide/topics/manifest/activity-element#screen