{ "id": "97650", "key": "TIMOB-10039", "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": "13573", "description": "Sprint 2012-15 API", "name": "Sprint 2012-15 API", "archived": true, "released": true, "releaseDate": "2012-07-30" }, { "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-08-09T03:37:07.000+0000", "created": "2012-07-19T11:52:18.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "api", "module_view", "qe-testadded", "regression" ], "versions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2014-06-19T12:44:14.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": "Run the following code:\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tnavBarHidden : true,\r\n\tbackgroundColor : 'white'\r\n});\r\n\r\nvar parentView = Ti.UI.createView({\r\n\tbackgroundColor : 'blue',\r\n\twidth : Ti.UI.FILL,\r\n\theight : Ti.UI.SIZE,\r\n});\r\n\r\nfunction createContent() {\r\n\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 : 'red'\r\n\t});\r\n\r\n\tvar header = Ti.UI.createView({\r\n\t\twidth : '90%',\r\n\t\theight : '75dp',\r\n\t\tbackgroundColor : 'green'\r\n\t});\r\n\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\r\n\tvar active = Ti.UI.createSwitch({\r\n\t\ttop : 0,\r\n\t\tvalue:true\r\n\t\t//style : Ti.UI.Android.SWITCH_STYLE_CHECKBOX\r\n\t});\r\n\r\n\theader.add(label);\r\n\theader.add(active);\r\n\r\n\tview.add(header);\r\n\r\n\treturn view;\r\n}\r\n\r\nfor (var i = 0; i < 3; ++i) {\r\n\tparentView.add(createContent());\r\n}\r\n\r\nwin.add(parentView);\r\n\r\nwin.open(); \r\n{code}\r\n\r\nExpected result:\r\nThe 'testing' label should show\r\n\r\nActual result:\r\nThe 'testing' label does not show up", "attachment": [], "flagged": false, "summary": "iOS: Label does not show in nested views", "creator": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "208487", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Note: This only happens on master and is not a regression on 2_1_X. After running a git bisect, it looks like it's caused by this commit: https://github.com/appcelerator/titanium_mobile/commit/00e3d138d63902fad810c4cb7e55352ce33b8c6e", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-19T11:53:19.000+0000", "updated": "2012-07-19T11:53:19.000+0000" }, { "id": "208675", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Test Case from TIMOB-2574\r\n{code}\r\n\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: 'white',\r\n});\r\n \r\nvar theFont = {fontSize: 11, font: 'Helevetica' };\r\nvar container = Ti.UI.createView({\r\n layout:'vertical'\r\n}) \r\nvar controls1 = Ti.UI.createView({\r\n layout:'horizontal',\r\n height:Ti.UI.SIZE,\r\n top:10,\r\n borderColor:'#ccc',\r\n borderWidth:1\r\n}) \r\n \r\nvar title1 = Ti.UI.createLabel({\r\n font :theFont,\r\n text:'V-ALIGN'\r\n})\r\nvar c1b1 = Ti.UI.createButton({\r\n left:10,\r\n font :theFont,\r\n title:'TOP'\r\n})\r\nvar c1b2 = Ti.UI.createButton({\r\n left:10,\r\n font :theFont,\r\n title:'BOTTOM'\r\n})\r\nvar c1b3 = Ti.UI.createButton({\r\n left:10,\r\n font :theFont,\r\n title:'CENTER'\r\n})\r\ncontrols1.add(title1);\r\ncontrols1.add(c1b1);\r\ncontrols1.add(c1b2);\r\ncontrols1.add(c1b3);\r\ncontainer.add(controls1)\r\n \r\nvar controls2 = Ti.UI.createView({\r\n layout:'horizontal',\r\n height:Ti.UI.SIZE,\r\n top:10,\r\n borderColor:'#ccc',\r\n borderWidth:1\r\n}) \r\n \r\nvar title2 = Ti.UI.createLabel({\r\n font :theFont,\r\n text:'T-ALIGN'\r\n})\r\nvar c2b1 = Ti.UI.createButton({\r\n left:10,\r\n font :theFont,\r\n title:'LEFT'\r\n})\r\nvar c2b2 = Ti.UI.createButton({\r\n left:10,\r\n font :theFont,\r\n title:'RIGHT'\r\n})\r\nvar c2b3 = Ti.UI.createButton({\r\n left:10,\r\n font :theFont,\r\n title:'CENTER'\r\n})\r\ncontrols2.add(title2);\r\ncontrols2.add(c2b1);\r\ncontrols2.add(c2b2);\r\ncontrols2.add(c2b3);\r\ncontainer.add(controls2)\r\n \r\nvar controls3 = Ti.UI.createView({\r\n layout:'horizontal',\r\n height:Ti.UI.SIZE,\r\n top:10,\r\n borderColor:'#ccc',\r\n borderWidth:1\r\n}) \r\n \r\nvar title3 = Ti.UI.createLabel({\r\n font :theFont,\r\n text:'WIDTH'\r\n})\r\nvar c3b1 = Ti.UI.createButton({\r\n left:10,\r\n font :theFont,\r\n title:'SIZE'\r\n})\r\nvar c3b2 = Ti.UI.createButton({\r\n left:10,\r\n font :theFont,\r\n title:'200'\r\n})\r\nvar c3b3 = Ti.UI.createButton({\r\n left:10,\r\n font :theFont,\r\n title:'150'\r\n})\r\nvar c3b4 = Ti.UI.createButton({\r\n left:10,\r\n font :theFont,\r\n title:'100'\r\n})\r\ncontrols3.add(title3);\r\ncontrols3.add(c3b1);\r\ncontrols3.add(c3b2);\r\ncontrols3.add(c3b3);\r\ncontrols3.add(c3b4);\r\ncontainer.add(controls3);\r\n \r\nvar controls4 = Ti.UI.createView({\r\n layout:'horizontal',\r\n height:Ti.UI.SIZE,\r\n top:10,\r\n borderColor:'#ccc',\r\n borderWidth:1\r\n}) \r\n \r\nvar title4 = Ti.UI.createLabel({\r\n font :theFont,\r\n text:'HEIGHT'\r\n})\r\nvar c4b1 = Ti.UI.createButton({\r\n left:10,\r\n font :theFont,\r\n title:'SIZE'\r\n})\r\nvar c4b2 = Ti.UI.createButton({\r\n left:10,\r\n font :theFont,\r\n title:'200'\r\n})\r\nvar c4b3 = Ti.UI.createButton({\r\n left:10,\r\n font :theFont,\r\n title:'150'\r\n})\r\nvar c4b4 = Ti.UI.createButton({\r\n left:10,\r\n font :theFont,\r\n title:'100'\r\n})\r\ncontrols4.add(title4);\r\ncontrols4.add(c4b1);\r\ncontrols4.add(c4b2);\r\ncontrols4.add(c4b3);\r\ncontrols4.add(c4b4);\r\ncontainer.add(controls4);\r\n\r\nvar controls5 = Ti.UI.createView({\r\n layout:'horizontal',\r\n height:Ti.UI.SIZE,\r\n top:10,\r\n borderColor:'#ccc',\r\n borderWidth:1\r\n}) \r\n \r\nvar title5 = Ti.UI.createLabel({\r\n font :theFont,\r\n text:'TEXT'\r\n})\r\nvar c5b1 = Ti.UI.createButton({\r\n left:10,\r\n font :theFont,\r\n title:'TEXT 1'\r\n})\r\nvar c5b2 = Ti.UI.createButton({\r\n left:10,\r\n font :theFont,\r\n title:'TEXT 2'\r\n})\r\nvar c5b3 = Ti.UI.createButton({\r\n left:10,\r\n font :theFont,\r\n title:'TEXT 3'\r\n})\r\ncontrols5.add(title5);\r\ncontrols5.add(c5b1);\r\ncontrols5.add(c5b2);\r\ncontrols5.add(c5b3);\r\ncontainer.add(controls5);\r\n\r\nvar text1 = 'I am the test label. Switch my properties around and see me change. Vertical Alignment should work well with change in size and text alignment.';\r\nvar text2 = 'I am a medium size label that should span more than one line.' \r\nvar text3 = 'Short Label.'\r\nvar testLabel = Ti.UI.createLabel({\r\n backgroundColor: 'white',\r\n color: 'black',\r\n text:text1,\r\n borderColor:'red',\r\n borderWidth:1,\r\n top:10\r\n})\r\ncontainer.add(testLabel);\r\n \r\nwin.add(container);\r\nwin.open();\r\n \r\n \r\nc1b1.addEventListener('click',function(e){testLabel.verticalAlign = Ti.UI.TEXT_VERTICAL_ALIGNMENT_TOP});\r\nc1b2.addEventListener('click',function(e){testLabel.verticalAlign = Ti.UI.TEXT_VERTICAL_ALIGNMENT_BOTTOM});\r\nc1b3.addEventListener('click',function(e){testLabel.verticalAlign = Ti.UI.TEXT_VERTICAL_ALIGNMENT_CENTER});\r\nc2b1.addEventListener('click',function(e){testLabel.textAlign = Ti.UI.TEXT_ALIGNMENT_LEFT});\r\nc2b2.addEventListener('click',function(e){testLabel.textAlign = Ti.UI.TEXT_ALIGNMENT_RIGHT});\r\nc2b3.addEventListener('click',function(e){testLabel.textAlign = Ti.UI.TEXT_ALIGNMENT_CENTER});\r\nc3b1.addEventListener('click',function(e){testLabel.width = Ti.UI.SIZE})\r\nc3b2.addEventListener('click',function(e){testLabel.width = 200})\r\nc3b3.addEventListener('click',function(e){testLabel.width = 150})\r\nc3b4.addEventListener('click',function(e){testLabel.width = 100})\r\nc4b1.addEventListener('click',function(e){testLabel.height = Ti.UI.SIZE})\r\nc4b2.addEventListener('click',function(e){testLabel.height = 200})\r\nc4b3.addEventListener('click',function(e){testLabel.height = 150})\r\nc4b4.addEventListener('click',function(e){testLabel.height = 100})\r\nc5b1.addEventListener('click',function(e){testLabel.text = text1})\r\nc5b2.addEventListener('click',function(e){testLabel.text = text2})\r\nc5b3.addEventListener('click',function(e){testLabel.text = text3})\r\n{code}", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-07-20T10:10:54.000+0000", "updated": "2012-07-20T10:10:54.000+0000" }, { "id": "208679", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pull pending https://github.com/appcelerator/titanium_mobile/pull/2620", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-07-20T10:24:03.000+0000", "updated": "2012-07-20T10:24:03.000+0000" }, { "id": "213509", "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-08-09T03:35:27.000+0000", "updated": "2012-08-09T03:35:27.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }