{ "id": "91845", "key": "TIMOB-10003", "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": "13872", "description": "", "name": "Sprint 2012-16 Core", "archived": true, "released": true, "releaseDate": "2012-08-13" }, { "id": "14096", "description": "Release 2.1.2", "name": "Release 2.1.2", "archived": true, "released": true, "releaseDate": "2012-08-31" }, { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-09-07T13:38:44.000+0000", "created": "2012-05-15T05:55:53.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "core", "layout", "module_view", "qe-review", "qe-testadded" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" } ], "issuelinks": [ { "id": "19575", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "98139", "key": "TIMOB-10173", "fields": { "summary": "Android: Horizontal Layout inside Vertical Layout does not wrap content correctly", "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": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "19074", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "97369", "key": "TIMOB-9966", "fields": { "summary": "Android: ScrollView not scrolling with horizontal layout", "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": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "20664", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "100614", "key": "TIMOB-10812", "fields": { "summary": "Android: Ti.UI.SIZE on width does not work with horizontal layouts", "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": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-09-21T00:24:29.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": "h2. The problem\r\n\r\nIt seems that view component does not size itself well when nested views are present. To see this issue, run this example:\r\n\r\n{code}\r\n(function() {\r\n\t\r\n var win = Ti.UI.createWindow({ navBarHidden: true, backgroundColor: '#999' });\r\n \r\n var parentView = Ti.UI.createView({\r\n \tbackgroundColor: '#000',\r\n \twidth: Ti.UI.FILL,\r\n \theight: Ti.UI.SIZE,\r\n \tbackgroundColor: '#f00'\r\n });\r\n \r\n function createContent() {\r\n \t\r\n \tvar view = Ti.UI.createView({\r\n \t\ttop: 0,\r\n \t\tlayout: 'horizontal',\r\n \t\twidth: Ti.UI.FILL,\r\n \t\theight: Ti.UI.SIZE,\r\n \t\tbackgroundColor: '#0f0'\r\n \t});\r\n \t\r\n \tvar header = Ti.UI.createView({\r\n \t\twidth: '90%',\r\n \t\theight: '75dp',\r\n \t\tbackgroundColor: '#00f'\r\n \t});\r\n \t\r\n \tvar label = Ti.UI.createLabel({\r\n \t\ttop: 0,\r\n \t\theight: '75dp',\r\n \t\twidth: '50%',\r\n \t\ttext: 'Testing ...'\r\n \t});\r\n \t\r\n \tvar active = Ti.UI.createSwitch({\r\n \t\ttop: 0,\r\n \t\tstyle: Ti.UI.Android.SWITCH_STYLE_CHECKBOX\r\n \t});\r\n \t\r\n \theader.add(label);\r\n \theader.add(active);\r\n \t\r\n \tview.add(header);\r\n \t\r\n \treturn view;\r\n }\r\n \r\n for (var i = 0; i < 3; ++i) {\r\n \tparentView.add(createContent());\r\n }\r\n \r\n win.add(parentView);\r\n \r\n \r\n win.open();\r\n\r\n})();\r\n{code}\r\n\r\nYou should see only one nested view (one label and one switch).\r\n\r\nh2. Expected behavior\r\n\r\n\r\n\"parentView\" should size itself according to the size of its content. So, all three child views should be visible (and not only one).\r\nThis works fine on iOS.", "attachment": [], "flagged": false, "summary": "Android: Ti.UI.SIZE does not work well with nested views", "creator": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "* Titanium SDK version: 2.1.0 (05/14/12 21:18 6db8dd3)\r\n* v8\r\n* Android 3.0\r\n* Thinkpad tablet\r\n* OSX Lion\r\n", "comment": { "comments": [ { "id": "208485", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I tried on 2.0.1GA2, 2.0.2GA, 2.1.0GA, and they look the same in both iOS and android. Closing as can't reproduce. Feel free to reopen if this still occurs.", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-19T11:45:31.000+0000", "updated": "2012-07-19T11:45:31.000+0000" }, { "id": "208635", "author": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Hi Allen.\r\n\r\n\r\nI'm still seeing this issue. I modified test example a bit:\r\n\r\n{code}\r\n(function() {\r\n     \r\n    var win = Ti.UI.createWindow({ navBarHidden: true, backgroundColor: '#999' });\r\n     \r\n    var parentView = Ti.UI.createView({\r\n\tlayout: 'horizontal',\r\n        width: Ti.UI.FILL,\r\n        //height: 350,\r\n\theight: Ti.UI.SIZE,\r\n        backgroundColor: '#f00'\r\n    });\r\n     \r\n    function createContent() {\r\n         \r\n        var view = Ti.UI.createView({\r\n            top: 10,\r\n            layout: 'horizontal',\r\n            width: Ti.UI.FILL,\r\n\t height: Ti.UI.SIZE,\r\n            backgroundColor: '#0f0'\r\n        });\r\n         \r\n        var header = Ti.UI.createView({\r\n            width: '90%',\r\n            height: '75dp',\r\n\t layout: 'horizontal',\r\n            backgroundColor: '#00f'\r\n        });\r\n         \r\n        var label = Ti.UI.createLabel({\r\n            top: 0,\r\n            height: '75dp',\r\n            width: '50%',\r\n            text: 'Testing ...',\r\n\t backgroundColor: '#ff0'\r\n        });\r\n         \r\n        var active = Ti.UI.createSwitch({\r\n            top: 0\r\n        });\r\n         \r\n        header.add(label);\r\n        header.add(active);\r\n         \r\n        view.add(header);\r\n         \r\n        return view;\r\n    }\r\n     \r\n    for (var i = 0; i < 3; ++i) {\r\n        parentView.add(createContent());\r\n    }\r\n     \r\n    win.add(parentView);\r\n     \r\n     \r\n    win.open();\r\n \r\n})();\r\n{code}\r\n\r\n\r\nTested on 4.0.3 ICS tablet (Thinkpad tablet) with latest CI build: Titanium SDK version: 2.2.0 (07/19/12 16:01 6d95a75)\r\n\r\nHere is screenshot.\r\nhttp://i48.tinypic.com/5dkzo3.png\r\n\r\n\r\nAs you can see, only first child is visible (and there should be three).\r\n\r\n\r\nI also tested with x86 emulator (with newly created project in Titanium Studio) and I got same result.\r\n\r\n\r\nOn iPhone simulator, everything works fine.", "updateAuthor": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2012-07-20T01:26:28.000+0000", "updated": "2012-07-20T01:26:28.000+0000" }, { "id": "208653", "author": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening this issue based on last comment.", "updateAuthor": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-20T08:41:47.000+0000", "updated": "2012-07-20T08:41:47.000+0000" }, { "id": "208771", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This works on the master branch, it looks like https://github.com/appcelerator/titanium_mobile/pull/2613 may have fixed it.", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-20T16:26:56.000+0000", "updated": "2012-07-20T16:26:56.000+0000" }, { "id": "208844", "author": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Yes, I can confirm this works fine with latest master build. Thanks.", "updateAuthor": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2012-07-22T23:47:14.000+0000", "updated": "2012-07-22T23:47:14.000+0000" }, { "id": "210647", "author": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Please do not close this issue. The issue still exists (but it is not covered with this test case). I'm working on better test case, but it will take some time. Thanks.", "updateAuthor": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2012-07-31T05:15:24.000+0000", "updated": "2012-07-31T05:15:24.000+0000" }, { "id": "210658", "author": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "This issue turned out to be more simpler and more serious than I thought.\r\n\r\n\r\nHere is simple test case that fails:\r\n\r\n{code}\r\n(function() {\r\n      \r\n    var win = Ti.UI.createWindow({\r\n\t\tnavBarHidden: true,\r\n\t\tbackgroundColor: '#000'\r\n\t});\r\n    \r\n\tvar topView = Ti.UI.createView({\r\n    \tbackgroundColor: '#00f',\r\n\t\theight: Ti.UI.SIZE,\r\n\t\ttop: 0,\r\n\t\twidth: Ti.UI.DIMENSION_FILL,\r\n\t\tlayout: 'horizontal'\r\n    });\r\n\r\n\ttopView.add(Ti.UI.createLabel({ text: 'Label 1', width: '50%', backgroundColor: '#f00' }));\r\n\ttopView.add(Ti.UI.createSwitch({ value: false }));\r\n\ttopView.add(Ti.UI.createLabel({ text: 'Label 2', width: '50%', backgroundColor: '#0f0' }));\r\n\ttopView.add(Ti.UI.createSwitch({ value: true }));\r\n\t\r\n\twin.add(topView);\r\n\t\r\n\twin.open();\r\n\t\r\n})();\r\n{code}\r\n\r\nTested with latest CI build (Titanium SDK version: 2.2.0 (07/30/12 21:21 e382067)), v8, Android 4.0.3 (Thinkpad tablet), Mountain Lion.\r\n\r\n\r\n\r\nThis works fine on iOS simulator and mobile web.", "updateAuthor": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2012-07-31T07:18:48.000+0000", "updated": "2012-07-31T07:18:48.000+0000" }, { "id": "210896", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "@Ivan FYI there is no Ti.UI.DIMENSION_FILL constant. It should be Ti.UI.FILL\r\n\r\nPR Ready:\r\n\r\nhttps://github.com/appcelerator/titanium_mobile/pull/2663", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-31T16:57:34.000+0000", "updated": "2012-07-31T16:57:34.000+0000" }, { "id": "210937", "author": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Yes, you're right, sorry about that - I use that constant name in the framework that I use so I accidentally used it here also.\r\n\r\n\r\n\r\nThanks for the fix.", "updateAuthor": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2012-08-01T00:02:44.000+0000", "updated": "2012-08-01T00:02:44.000+0000" }, { "id": "211362", "author": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Just tried this fix in my complex app and now layout works much-much better. :)\r\n\r\n\r\nExcellent! Thanks.", "updateAuthor": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2012-08-03T01:21:10.000+0000", "updated": "2012-08-03T01:21:10.000+0000" }, { "id": "211364", "author": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Actually, there are still some minor issues (when content is table view), I'll make new test case soon.", "updateAuthor": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2012-08-03T02:11:19.000+0000", "updated": "2012-08-03T02:11:19.000+0000" }, { "id": "211490", "author": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "I commented issue with table view in TIMOB-9966.", "updateAuthor": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2012-08-06T03:07:52.000+0000", "updated": "2012-08-06T03:07:52.000+0000" }, { "id": "214084", "author": { "name": "etcarev", "key": "etcarev", "displayName": "Evgenii Tcarev", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed with:\r\nTitanium Studio, build: 2.1.1.201207271312\r\nSDK version: 2.2.0.v20120810194112\r\nDevices:\r\nLG VS910 4G (2.3.6)\r\nLG-V909 (3.1)", "updateAuthor": { "name": "etcarev", "key": "etcarev", "displayName": "Evgenii Tcarev", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-13T11:40:53.000+0000", "updated": "2012-08-13T11:40:53.000+0000" }, { "id": "214449", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR for 2_1_X branch: https://github.com/appcelerator/titanium_mobile/pull/2741", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-14T14:54:03.000+0000", "updated": "2012-08-14T14:54:03.000+0000" }, { "id": "214451", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopen to update fix version.", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-14T14:54:20.000+0000", "updated": "2012-08-14T14:54:20.000+0000" }, { "id": "217795", "author": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening to update labels", "updateAuthor": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-06T04:13:35.000+0000", "updated": "2012-09-06T04:13:35.000+0000" }, { "id": "217944", "author": { "name": "ptquang86", "key": "ptquang86", "displayName": "Quang Pham", "active": true, "timeZone": "Asia/Jakarta" }, "body": "This fix broke my app.\r\nwhen the View have \r\nwidth: Ti.UI.SIZE, its width should be the total width of its contents\r\nbut now, it act the same as width: Ti.UI.FILL (its width fill all the space)\r\n\r\n\r\n\r\n\r\nvar win = Ti.UI.createWindow({ backgroundColor: 'white' });\r\nvar view = Ti.UI.createView({ width: Ti.UI.SIZE, height: 30, layout: 'horizontal', backgroundColor: 'red' });\r\nview.add(Ti.UI.createLabel({ text: 'Hello', height: 30, top: 0, color: 'white' }));\r\nview.add(Ti.UI.createLabel({ text: 'From Titanium', height: 30, top: 0, color: 'blue', left: 5 }));\r\nwin.add(view);\r\nwin.open();\r\n", "updateAuthor": { "name": "ptquang86", "key": "ptquang86", "displayName": "Quang Pham", "active": true, "timeZone": "Asia/Jakarta" }, "created": "2012-09-06T21:55:57.000+0000", "updated": "2012-09-06T21:55:57.000+0000" }, { "id": "217983", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening since it seems to have caused a regression with size behavior on width and horizontal layout", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-07T09:38:16.000+0000", "updated": "2012-09-07T09:38:16.000+0000" }, { "id": "218024", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-07T13:44:46.000+0000", "updated": "2012-09-07T13:44:46.000+0000" } ], "maxResults": 19, "total": 19, "startAt": 0 } } }