{ "id": "152864", "key": "TIMOB-19900", "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": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2018-07-20T21:05:19.000+0000", "created": "2015-11-10T09:52:01.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "layout" ], "versions": [], "issuelinks": [ { "id": "56687", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "171929", "key": "TIMOB-26211", "fields": { "summary": "iOS: Percentage based layout rounds floating widths/heights incorrectly", "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": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": null, "updated": "2018-08-06T17:41:07.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "The following sample and attached screenshots show that while 4 * 25% = 5 * 20% = 100% the last view is wrapped on iOS. On Android it works as expected.\r\n\r\nEnabling auto-layout doen't affect the issue.\r\n\r\n*Example*\r\n\r\n{code:xml}\r\n\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n\r\n{code}", "attachment": [ { "id": "57340", "filename": "android_20151110-104500.png", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-11-10T09:53:03.000+0000", "size": 33478, "mimeType": "image/png" }, { "id": "57341", "filename": "Simulator Screen Shot 10 Nov 2015 10.40.02.png", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-11-10T09:52:58.000+0000", "size": 16074, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS Layout: Views wrap while their total width % equals 100", "creator": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "SDK 5.1.0.RC (also older)\r\niOS 9.1 Simulator (also older and on device)\r\n", "closedSprints": [ { "id": 1053, "state": "closed", "name": "2018 Sprint 15 SDK", "startDate": "2018-07-15T21:52:05.453Z", "endDate": "2018-07-29T21:52:00.000Z", "completeDate": "2018-07-29T22:25:11.723Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "369532", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Also reported on Stack Overflow:\r\nhttp://stackoverflow.com/q/33613680/4626813", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-11-10T09:52:31.000+0000", "updated": "2015-11-10T09:52:31.000+0000" }, { "id": "372600", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Might be also happening on Android in certain scenarios:\r\nhttp://stackoverflow.com/questions/34001540/openglrenderer-path-too-large-to-be-rendered-into-a-texture-in-titanium", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-12-10T08:31:59.000+0000", "updated": "2015-12-10T08:31:59.000+0000" }, { "id": "426710", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I've confirmed that this is horizontal layout bug on iOS. It happens when the percentages of each view in the row add up to 100%. (We're likely missing a floating point epsilon comparison check in our code.)\r\n\r\nHere is the code I ran...\r\n\r\n{code:javascript}\r\nvar window = Ti.UI.createWindow(\r\n{\r\n\tlayout: \"vertical\",\r\n\tbackgroundColor: \"black\",\r\n\tfullscreen: true,\r\n});\r\n\r\ncontainerView = Ti.UI.createView(\r\n{\r\n\tlayout: \"horizontal\",\r\n\tbackgroundColor: \"red\",\r\n\twidth: Ti.UI.SIZE,\r\n\theight: Ti.UI.SIZE,\r\n});\r\ncontainerView.add(Ti.UI.createLabel(\r\n{\r\n\ttext: \"Left (50%)\",\r\n\ttextAlign: Ti.UI.TEXT_ALIGNMENT_CENTER,\r\n\tcolor: \"black\",\r\n\tbackgroundColor: \"orange\",\r\n\twidth: \"50%\",\r\n}));\r\ncontainerView.add(Ti.UI.createLabel(\r\n{\r\n\ttext: \"Right (50%)\",\r\n\ttextAlign: Ti.UI.TEXT_ALIGNMENT_CENTER,\r\n\tcolor: \"black\",\r\n\tbackgroundColor: \"lime\",\r\n\twidth: \"50%\",\r\n}));\r\nwindow.add(containerView);\r\nwindow.add(Ti.UI.createView({ height: \"1%\" }));\r\n\r\ncontainerView = Ti.UI.createView(\r\n{\r\n\tlayout: \"horizontal\",\r\n\tbackgroundColor: \"red\",\r\n\twidth: Ti.UI.SIZE,\r\n\theight: Ti.UI.SIZE,\r\n});\r\ncontainerView.add(Ti.UI.createLabel(\r\n{\r\n\ttext: \"Left (50%)\",\r\n\ttextAlign: Ti.UI.TEXT_ALIGNMENT_CENTER,\r\n\tcolor: \"black\",\r\n\tbackgroundColor: \"green\",\r\n\twidth: \"50%\",\r\n}));\r\ncontainerView.add(Ti.UI.createLabel(\r\n{\r\n\ttext: \"Right (Filled)\",\r\n\ttextAlign: Ti.UI.TEXT_ALIGNMENT_CENTER,\r\n\tcolor: \"black\",\r\n\tbackgroundColor: \"orange\",\r\n\twidth: Ti.UI.FILL,\r\n}));\r\nwindow.add(containerView);\r\n\r\nwindow.open();\r\n{code}\r\n\r\n*Work-Around:*\r\nSet up the last view in the row to use a Ti.UI.FILL width.\r\n\r\n*Note:*\r\nThis particular bug is not an issue on Android. (Android has different horizontal layout bugs not related to this particular issue.)", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-08-15T21:18:19.000+0000", "updated": "2017-08-15T21:18:33.000+0000" }, { "id": "439386", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Fixed as part of TIMOB-26211", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-07-20T21:05:19.000+0000", "updated": "2018-07-20T21:05:19.000+0000" }, { "id": "439980", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as a duplicate. If this is in error, please reopen.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-08-06T17:41:07.000+0000", "updated": "2018-08-06T17:41:07.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }