I have an issue.
I have a method which checks if screen is in landscape mode:
private boolean isLandscape() {
final Resources resources = getResources();
return resources != null && resources.getConfiguration() != null
&& resources.getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE;
}
It works perfectly when screen is not split. The problem is the next:
It returns false
when screen is split.
In this case resources.getConfiguration().orientation
returns ORIENTATION_PORTRAIT
. I have read android reference(#1, #2), but I did not found any information.
- Device: Nexus 5x
- OS: Android 7.0
Any suggestions?