The "Ti.UI.Window.orientation" property should return the orientation that the OS is displaying its screen contents. This is how it works on iOS. Instead, on Android, it returns the orientation of the app window based on its width and height (ex: if width > height, then it's landscape).
This is an issue when displaying the app in split-screen mode. For example, when the device is held landscape, apps are displayed side-by-side in portrait form. Android currently returns portrait in this case when it should return landscape (the screen's orientation).
Steps to Reproduce:
- Run the below code on an Android 7.0 or newer device.
- Hold the device in portrait orientation.
- On the bottom navigation bar, hold the square button (aka: the multi-tasking button).
- Select an app from the multi-tasking app list to put it into split-screen mode.
- Notice that this app displays "Landscape" instead of "Portrait".
- Rotate the device 90 degrees to landscape form.
- Notice that this app displays "Portrait" instead of "Landscape".