Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

platformWidth/platformHeight not correct in landscape mode [Android]

$
0
0

Android 5, SDK 3.5.0

"Window":{
    backgroundColor:"#fff",
    orientationModes:[Ti.UI.LANDSCAPE_LEFT,Ti.UI.LANDSCAPE_RIGHT],
    fullscreen:true
}
var WIDTH = Ti.Platform.displayCaps.platformWidth / Ti.Platform.displayCaps.logicalDensityFactor;
var HEIGHT = Ti.Platform.displayCaps.platformHeight / Ti.Platform.displayCaps.logicalDensityFactor;
is wrong (width is smaller). The doc says that it should be " restricted by Titanium.UI.Window.orientationModes".

My fix is to check if WIDTH < HEIGHT to change the values but shouldn't platformWidth and platformHeight return the correct landscape values?


Viewing all articles
Browse latest Browse all 8068

Trending Articles