{ "id": "121317", "key": "TIMOB-15525", "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": [ { "id": "15703", "description": "2013 Sprint 22", "name": "2013 Sprint 22", "archived": true, "released": true, "releaseDate": "2013-11-01" }, { "id": "15705", "description": "2013 Sprint 22 Core", "name": "2013 Sprint 22 Core", "archived": true, "released": true, "releaseDate": "2013-11-01" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-10-24T00:18:18.000+0000", "created": "2013-10-17T13:32:58.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "android", "module_android", "parity", "qe-manualtest", "qe-testadded", "regression", "width" ], "versions": [], "issuelinks": [], "assignee": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-11-19T21:28:25.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": "On iOS, setting view A's {{left}} + {{right}} and leaving/setting {{width}} to {{Ti.UI.SIZE}} will result in the width of A's parent, minus A's {{left}} + {{right}}, being used as a maximum for A's effective width.\r\n\r\nOn Android, the result will be as if only {{left}} was set and the view A will be as long as it needs to be for its content, until it hits A's parent width.\r\n\r\nSee the screenshots for the difference with the following code:\r\n\r\n{code}\r\nvar win = Titanium.UI.createWindow({\r\n backgroundColor:'#fff'\r\n});\r\n\r\nvar view = Ti.UI.createView({\r\n top: 0,\r\n width: 300,\r\n backgroundColor: '#ccc'\r\n});\r\n\r\nview.add(Ti.UI.createLabel({\r\n width: 200,\r\n\r\n height: 20, // Force ellipsize on iOS\r\n wordWrap: false,\r\n ellipsize: true,\r\n top: 100,\r\n text: 'WIDTH, WIDTH, WIDTH, WIDTH, WIDTH, WIDTH, WIDTH',\r\n backgroundColor: 'red',\r\n color: 'white'\r\n}));\r\n\r\nview.add(Ti.UI.createLabel({\r\n left: 50,\r\n right: 50,\r\n\r\n height: 20, // Force ellipsize on iOS\r\n wordWrap: false,\r\n ellipsize: true,\r\n top: 200,\r\n text: 'LEFT + RIGHT, LEFT + RIGHT, LEFT + RIGHT, LEFT + RIGHT',\r\n backgroundColor: 'green',\r\n color: 'white'\r\n}));\r\n\r\nview.add(Ti.UI.createLabel({\r\n left: 50,\r\n width: Ti.UI.FILL,\r\n right: 50,\r\n\r\n height: 20, // Force ellipsize on iOS\r\n wordWrap: false,\r\n ellipsize: true,\r\n top: 300,\r\n text: 'LEFT + FILL + RIGHT, LEFT + FILL + RIGHT, LEFT + FILL + RIGHT',\r\n backgroundColor: 'blue',\r\n color: 'white'\r\n}));\r\n\r\n\r\nview.add(Ti.UI.createLabel({\r\n left: 50,\r\n width: Ti.UI.SIZE,\r\n right: 50,\r\n\r\n height: 20, // Force ellipsize on iOS\r\n wordWrap: false,\r\n ellipsize: true,\r\n top: 400,\r\n text: 'LEFT + SIZE + RIGHT, LEFT + SIZE + RIGHT, LEFT + SIZE + RIGHT',\r\n backgroundColor: 'yellow',\r\n color: 'black'\r\n}));\r\n\r\nwin.add(view);\r\nwin.open();\r\n{code}", "attachment": [ { "id": "43263", "filename": "device-2013-10-17-153212.png", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2013-10-17T13:32:58.000+0000", "size": 21206, "mimeType": "image/png" }, { "id": "43264", "filename": "iOS Simulator Screen shot 17 okt. 2013 15.32.04.png", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2013-10-17T13:32:58.000+0000", "size": 11311, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: Setting left + right doesn't limit width when set/left to Ti.UI.SIZE", "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 3.1.0GA - 3.1.3.GA\r\nCLI 3.1.2\r\nAndroid 4.1.2 on Samsung Galaxy S2\r\nAndroid 4.2 on Sony Experia Z1\r\niOS6 on iOS Simulator", "comment": { "comments": [ { "id": "275567", "author": { "name": "jbuckley", "key": "jbuckley", "displayName": "Jamie Buckley", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This does not occur in 3.0.2 and below, So it would seem that it is a regression occuring in 3.1.0", "updateAuthor": { "name": "jbuckley", "key": "jbuckley", "displayName": "Jamie Buckley", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-18T01:00:27.000+0000", "updated": "2013-10-18T01:00:27.000+0000" }, { "id": "276287", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "https://github.com/appcelerator/titanium_mobile/pull/4828", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-23T00:47:07.000+0000", "updated": "2013-10-23T00:47:07.000+0000" }, { "id": "276548", "author": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Works as expected so closing the issue.\r\n\r\nVerified fix on:\r\nDevice : HTC desire V , Android version : 4.0.3\r\nSDK: 3.2.0.v20131023222443\r\nCLI version : 3.2.0\r\nOS : MAC OSX 10.8.4\r\nAlloy : 1.2.2\r\nAppcelerator Studio, build: 3.2.0.201310181700\r\nXCode : 5", "updateAuthor": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-10-24T06:52:47.000+0000", "updated": "2013-10-24T06:52:47.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }