Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17615] Selected defaultunit should be available under Ti.UI

GitHub Issuen/a
TypeNew Feature
PriorityNone
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 3.3.0
Fix Version/sn/a
ComponentsiOS
LabelsTCSupport, defaultunit, unit
ReporterFokke Zandbergen
AssigneeUnknown
Created2014-07-10T08:11:48.000+0000
Updated2018-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.

Comments

No comments

JSON Source