[ALOY-842] Alloy: Have the measurement builtin use actual pixels for iOS as well
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-08-05T20:41:43.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Alloy 1.3.0, 2013 Sprint 22 |
Components | Styling |
Labels | alloy, builtins, measurement, qe-automatedtest |
Reporter | Mostafizur Rahman |
Assignee | Tony Lukasavage |
Created | 2013-10-03T08:07:16.000+0000 |
Updated | 2014-08-05T20:49:07.000+0000 |
Description
Right now, the measurement builtin converts
dp
to px
and visa versa for Android only. For iOS, the given value is returned as is.
This is understandable, since you would typically use the builtin's methods to get the right dimension for Android in it's system default px
unit, based on a dp
value you use on iOS.
But of course this is not really accurate since on retina screens 1dp
actually correspondents to 2px
.
So I'd propose have the builtin take this into account, either as the default or as an option. I prefer to have it as the default.
The PR: https://github.com/appcelerator/alloy/pull/249
Related docs: http://docs.appcelerator.com/titanium/latest/#!/guide/Transitioning_to_the_New_UI_Layout_System-section-30088148_TransitioningtotheNewUILayoutSystem-UniversalUnitSupport
PR: https://github.com/appcelerator/alloy/pull/254 test app: https://github.com/appcelerator/alloy/tree/master/test/apps/testing/ALOY-842 Functional test should include running the test app on both retina and non-retina ios devices, and ensuring that the runtime tests pass. You should also run it on more than one android device density to ensure that the current tests for it pass as well.
Resolved fixed and working as expected. TiSDK 3.2.0.v20131127194046 CLI 3.2.0-beta Alloy 1.3.0-beta Titanium Studio 3.2.0.201311262027 iPad OS 7 and simulator Android Google Nexus Galaxy 4.3 Closing.