[TIMOB-17615] Selected defaultunit should be available under Ti.UI
| GitHub Issue | n/a |
|---|---|
| Type | New Feature |
| Priority | None |
| Status | Open |
| Resolution | Unresolved |
| Affected Version/s | Release 3.3.0 |
| Fix Version/s | n/a |
| Components | iOS |
| Labels | TCSupport, defaultunit, unit |
| Reporter | Fokke Zandbergen |
| Assignee | Unknown |
| Created | 2014-07-10T08:11:48.000+0000 |
| Updated | 2018-02-28T20:03:13.000+0000 |
Description
If you set the defaultunit via
tiapp.xml using <property name="ti.ui.defaultunit">dp</property> you can request this in run-time using Ti.App.Properties.getString('ti.ui.defaultunit');.
However, I'd like to also have Ti.App.defaultUnit return one of the Ti.UI.UNIT_* constants, so that in a widget or module (where I'm not in control of the tiapp.xml) I can more easily detect the current setting and use this e.g. in Ti.UI.convertUnits when doing complex layout calculations.
No comments