{ "id": "90743", "key": "TIMOB-9116", "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": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13404", "description": "Sprint 2012-12 Core", "name": "Sprint 2012-12 Core", "archived": true, "released": true, "releaseDate": "2012-06-17" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-07-11T01:34:00.000+0000", "created": "2012-04-23T09:15:16.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "core", "module_view", "qe-testadded" ], "versions": [ { "id": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" } ], "issuelinks": [ { "id": "17492", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "92293", "key": "TIMOB-9225", "fields": { "summary": "iOS: Review composite layout feature requests", "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": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-07-11T13:49:52.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": "h2. Problem\r\n\r\nI'm currently migrating my app to the new layout system of Titanium Mobile 2.0.\r\nThere is just one issue where I think the height of a view is not correct calculated.\r\n\r\nh2. Test Case\r\n\r\n{code:title=app.js|borderStyle=solid}\r\nvar win = Ti.UI.createWindow({backgroundColor: 'white'});\r\nwin.open();\r\n \r\nvar view = Ti.UI.createView({backgroundColor: 'red', layout: 'horizontal', left: 0, top: 5, width: Ti.UI.FILL, height: Ti.UI.SIZE});\r\n \r\nview.add(Ti.UI.createLabel({backgroundColor: 'green', \r\n left: 10, top: 4, color: 'black', width: Ti.UI.SIZE, height: Ti.UI.SIZE,\r\n text: 'This is a test'}));\r\n \r\nwin.add(view);\r\n{code}\r\n\r\nh3. Result\r\nThe red view is much higher than the label (green background). Cause I used Ti.UI.SIZE I expect that the red view is as high as the label. \r\n\r\nIt works as expected when not defining the left and top property in the label. But I do have to set these. Otherwise I can't create the layout I want.\r\n\r\n{code}\r\nview.add(Ti.UI.createLabel({backgroundColor: 'green', \r\n color: 'black', width: Ti.UI.SIZE, height: Ti.UI.SIZE,\r\n text: 'This is a test'}));\r\n{code}\r\n\r\nh2. Community Discussion\r\n\r\n[Q&A|http://developer.appcelerator.com/question/135813/ios-height-of-view-not-correct-when-using-horizontal-layout-ti-201]", "attachment": [], "flagged": false, "summary": "iOS: Height of view is not correct in new layout system when using horizontal layout", "creator": { "name": "jicks83", "key": "jicks83", "displayName": "Jick Steen", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "jicks83", "key": "jicks83", "displayName": "Jick Steen", "active": true, "timeZone": "Europe/Berlin" }, "environment": "* Titanium SDK version: Titanium Mobile 2.0.1.GA2\r\n* Platform & version: iOS 5.1, Xcode 4.3.2\r\n* Device Details: iOS simulator\r\n* Host Operating System: OSX 10.7.3\r\n* Titanium Studio version: 2.0.1.201204132053", "comment": { "comments": [ { "id": "194584", "author": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "body": "Moved to appropriate section.", "updateAuthor": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "created": "2012-05-11T15:44:07.000+0000", "updated": "2012-05-11T15:44:07.000+0000" }, { "id": "198191", "author": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Test case 1:\r\n{code}\r\nvar win = Ti.UI.createWindow({backgroundColor: 'white'});\r\nwin.open();\r\n \r\nvar view = Ti.UI.createView({backgroundColor: 'red', layout: 'horizontal', left: 0, top: 5, width: Ti.UI.FILL, height: Ti.UI.SIZE});\r\n \r\nview.add(Ti.UI.createLabel({backgroundColor: 'green', \r\n left: 10, color: 'black', width: Ti.UI.SIZE, height: Ti.UI.SIZE,\r\n text: 'This is a test'}));\r\n \r\nwin.add(view);\r\n// green label height == red view height\r\n{code}\r\n\r\nTest case 2:\r\n{code}\r\nvar win = Ti.UI.createWindow({backgroundColor: 'white'});\r\nwin.open();\r\n \r\nvar view = Ti.UI.createView({backgroundColor: 'red', layout: 'horizontal', left: 0, top: 5, width: Ti.UI.SIZE, height: Ti.UI.SIZE});\r\n \r\nview.add(Ti.UI.createLabel({backgroundColor: 'green', \r\n top: 4, color: 'black', width: Ti.UI.SIZE, height: Ti.UI.SIZE,\r\n text: 'This is a test'}));\r\n \r\nwin.add(view);\r\n// green label width == red view width\r\n// 4px gap above green label.\r\n{code}", "updateAuthor": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-12T12:12:42.000+0000", "updated": "2012-06-12T12:15:58.000+0000" }, { "id": "198219", "author": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR pending https://github.com/appcelerator/titanium_mobile/pull/2377", "updateAuthor": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-12T14:09:12.000+0000", "updated": "2012-06-12T14:09:12.000+0000" }, { "id": "198558", "author": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing issue\r\n\r\nTested with Ti Studio build 2.1.0.201206131907\r\nTi Mobile SDK 2.1.0.v20120613210250 hash rc8ddb29e\r\nOSX Lion 10.7.3\r\niPhone 4S OS 5.1\r\n\r\nVerified te sizing of the views and labels is correct", "updateAuthor": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-14T14:35:32.000+0000", "updated": "2012-06-14T14:35:32.000+0000" }, { "id": "202613", "author": { "name": "nchhabra", "key": "nchhabra", "displayName": "Neha Chhabra", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Reopening to update labels.", "updateAuthor": { "name": "nchhabra", "key": "nchhabra", "displayName": "Neha Chhabra", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2012-07-11T01:33:22.000+0000", "updated": "2012-07-11T01:33:22.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }