{ "id": "63835", "key": "TIMOB-3203", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2012-08-08T14:56:06.000+0000", "created": "2011-04-15T03:39:22.000+0000", "priority": { "name": "Trivial", "id": "5" }, "labels": [ "1.6", "android", "bug", "ios", "layout", "view" ], "versions": [], "issuelinks": [ { "id": "19755", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "94532", "key": "TIMOB-9901", "fields": { "summary": "TiAPI: Review and clean up platform bugs and reduce bug count by 20%.", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } } ], "assignee": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-24T18:20:05.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "{html}

If you apply layout:'horizontal' to a view, the label disappears\r\non iOS and is truncated in Android.

\r\n

Test Code:

\r\n
\r\n\r\nvar win = Ti.UI.createWindow({\r\n        backgroundColor: '#000'\r\n});\r\n\r\nvar view = Ti.UI.createView({\r\n    //layout:'horizontal',\r\n    left:0,\r\n    right:0\r\n});\r\n\r\nvar label = Titanium.UI.createLabel({\r\n    text:'TEST',\r\n    color:'#000000',\r\n    top:2,\r\n    right:15,\r\n    height:26,\r\n    left: 15,\r\n    backgroundColor:'#fff'\r\n});\r\n\r\nview.add(label);\r\n\r\nwin.add(view);\r\n\r\nwin.open();\r\n
\r\n

remove comment for layout to test behavior.

\r\n

Related HD Ticket: http://developer.appcelerator.com/helpdesk/view/74191

{html}", "attachment": [], "flagged": false, "summary": "Android & iOS Bug: layout on view causes unexpected results", "creator": { "name": "aleard", "key": "aleard", "displayName": "Alan Leard", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "aleard", "key": "aleard", "displayName": "Alan Leard", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "213409", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Horizontal layout makes room by asking for the minimum needed. At time of writing, the minimum needed by a view with undefined width is '0'. As of 2.0, the minimum needed is Ti.UI.SIZE, which is much less than without horizontal layout. In short, marking invalid.", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-08T14:55:45.000+0000", "updated": "2012-08-08T14:55:45.000+0000" }, { "id": "415664", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as invalid with reference to the above comments.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-24T18:20:05.000+0000", "updated": "2017-03-24T18:20:05.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }