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

I can't get the device screen size in real pixels

$
0
0

Hi ! basically I've this:

console.log(DPUnitsToPixels(Titanium.Platform.displayCaps.platformHeight)));
function DPUnitsToPixels(TheDPUnits){
    if ( Titanium.Platform.displayCaps.dpi > 160 )
          return (TheDPUnits * (Titanium.Platform.displayCaps.dpi / 160));
    else 
        return TheDPUnits;
}
when simulating on iPhone 6 Plus: 2208 when simulatiing on iPad air : 1664

According to Apple, i6p had 1920px of height while ipad air: 2048

What's wrong with the function ?


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>