[AC-392] Ti.Platform.displayCaps differs simulator/device
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Resolved |
Resolution | Cannot Reproduce |
Resolution Date | 2015-11-14T00:56:57.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | TCSupportTriage |
Reporter | Rainer Schleevoigt |
Assignee | Shak Hossain |
Created | 2015-01-14T13:35:42.000+0000 |
Updated | 2015-11-14T00:56:57.000+0000 |
Description
Retrieving of Ti.Platform.displayCaps differs between devices and simulator:
~~~
Simulator:
Ti.Platform.displayCaps.density: high
Ti.Platform.displayCaps.dpi: 320
Ti.Platform.displayCaps.platformHeight: 667
Ti.Platform.displayCaps.platformWidth: 375
Ti.Platform.displayCaps.logicalDensityFactor: 2
Device:
Ti.Platform.displayCaps.density: high
Ti.Platform.displayCaps.dpi: 320
Ti.Platform.displayCaps.platformHeight: 568
Ti.Platform.displayCaps.platformWidth: 320
Ti.Platform.displayCaps.logicalDensityFactor: 2
~~~
This is output using iPhone6. The similar issue is at iPhone6plus and iPhone5.
On device all phones works with virtual width of 320. On simulator it depends on model.
Background: in some cases I need absolute positioning in a grid. It runs with same geometry on device, but I cannot debug in simulator, because there are other dimensions.
HI, Just tried Ti.Platform.displayCaps all properties on my iphone6Plus, Can't reproduce your problem. Both of them, display the following info.
In my test set the platformWidth differs between simulator and device at iPhone6 and iPhone6plus. On device I can see everywhere 320, on simulator the with is increasing. As I can see from your answer the output differs on devices. Is it depending of parameters in tiapp.xml? I'm using:
I used the same default unit, still can't reproduce your problem with my 6plus device.
I have only a common iPhone6 and in my case I see on simulator the physical size and on device normalized (320) dimension. On my iPhone5c in both cases comes the same dimension. I think it is normal. Background: in my project I have to use absolute positoning (tiles in flipboard) and I have to calculate this.