Titanium JIRA Archive
Appcelerator Community (AC)

[AC-3047] API inconsistnent for layout/measurements, integer (px) or integer/string (px/dp)

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionNeeds more info
Resolution Date2011-12-25T16:28:34.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsapi,, layout
ReporterJimmy Forrester-Fellowes
AssigneePaul Dowsett
Created2011-12-13T08:09:44.000+0000
Updated2016-03-08T07:48:05.000+0000

Description

It appears there is inconsistency with Titanium's api for measurements, some components only allow integer (pixel) values for top/bottom/left/right/height/width whereas others accept integer or strings (so allow density pixels). Examples of this: animation object, border radius, borderWidth, etc. To get around the issue I'm calculating the density pixel value using the pixel value and the displays DPI. See here for solution: http://developer.appcelerator.com/question/125317/calculate-apps-density-pixel-width--height-using-titaniumplatformdisplaycapsdpi

Comments

  1. Paul Dowsett 2011-12-25

    Jimmy, I am sorry, but it's not clear what you want here. There have been some apidoc changes recently. Hopefully these have clarified when integers or strings are acceptable for a property. I am closing for the moment. If you are able to make detail the bugs you have found, then please reopen this ticket.
  2. Paul Dowsett 2012-02-17

    Closing due to inactivity. If this issue still exists, please raise a new ticket, including all the information in the [JIRA Ticket Checklist](https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report#HowtoSubmitaBugReport-JIRATicketChecklist) to ensure that we can escalate it quickly. Read [How to Submit a Bug Report](https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report) if you have not read it before, and always start a ticket using the [JIRA Ticket Template](https://wiki.appcelerator.org/display/guides/JIRA+Ticket+Template). Thanks in advance

JSON Source