I’m working on one app in which i used portrait mode for mobile devices and portrait/landscape(full sensor) mode for tablet devices. but the issue is in mobile devices, it first rotate to landscape mode and then rotate to portrait mode when device’s rotation setting is ON and we keep device on landscape mode.
To achieve different orientation mode between mobile and tablet devices i had written below code:
<code> if (!preferencesUtility.getIsTablet()) {
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
}
</code>
<code> if (!preferencesUtility.getIsTablet()) {
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
}
</code>
if (!preferencesUtility.getIsTablet()) {
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
}
I have tried below solution but not working :
<code> * I have tried by setting `android:screenOrientation="fullSensor"`
* Also i have tried by setting `android:screenOrientation="portrait"` and programmatically force tablet on full sensor mode then it will create issue in tablet. it first rotate to portrait then rotate to devices orientation either portrait or landscape
</code>
<code> * I have tried by setting `android:screenOrientation="fullSensor"`
* Also i have tried by setting `android:screenOrientation="portrait"` and programmatically force tablet on full sensor mode then it will create issue in tablet. it first rotate to portrait then rotate to devices orientation either portrait or landscape
</code>
* I have tried by setting `android:screenOrientation="fullSensor"`
* Also i have tried by setting `android:screenOrientation="portrait"` and programmatically force tablet on full sensor mode then it will create issue in tablet. it first rotate to portrait then rotate to devices orientation either portrait or landscape
highly appreciated your answers and suggestions