{ "id": "103386", "key": "TIMOB-13140", "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": "11", "description": "Is not a bug in our product", "name": "Not Our Bug" }, "resolutiondate": "2014-01-29T16:28:23.000+0000", "created": "2012-10-15T07:34:33.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "android", "height", "label" ], "versions": [], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-22T21:55:16.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": "look at the test case, the second containing blue view should have an height of 0. Instead it has the height of the label as if it had text.\r\nReplace the second label with a view and see how it should work\r\n{code}\r\nvar win = Titanium.UI.createWindow();\r\nwin.backgroundColor = '#ccc';\r\n\r\nvar container = Ti.UI.createView({\r\n \theight:70,\r\n \ttop:0,\r\n \tlayout:'vertical',\r\n \tbackgroundColor:'red'\r\n \t})\r\nvar view = Ti.UI.createView({\r\n\theight:Ti.UI.SIZE,\r\n backgroundColor:'blue'\r\n \t})\r\ncontainer.add(view);\r\n\r\nvar view2 = Ti.UI.createLabel({\r\n\theight:Ti.UI.SIZE,\r\n\tbackgroundColor:'green',\r\n\ttext:'TEST'\r\n})\r\nview.add(view2);\r\nwin.add(container);\r\n\r\ncontainer = Ti.UI.createView({\r\n \theight:70,\r\n \ttop:100,\r\n \tlayout:'vertical',\r\n \tbackgroundColor:'red'\r\n \t})\r\nview = Ti.UI.createView({\r\n\theight:Ti.UI.SIZE,\r\n \tbackgroundColor:'blue'\r\n \t})\r\ncontainer.add(view);\r\n\r\nview2 = Ti.UI.createLabel({ //create a view instead here and it works\r\n\theight:Ti.UI.SIZE,\r\n\tbackgroundColor:'green'\r\n})\r\nview.add(view2);\r\n\r\n\r\nwin.add(container);\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "[android] label with height = T.UI.SIZE and no text not sizing correctly in layout", "creator": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "environment": "titanium 2.1.3.GA to 3.1.0 master\r\nandroid 4.0.3\r\ndevice / simulator", "comment": { "comments": [ { "id": "290228", "author": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "body": "In Android textView, for simple text, layout (BoringLayout) assumes that the line count is 1 and the desired height is for this (if height is not specified).\r\n", "updateAuthor": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-01-29T16:28:23.000+0000", "updated": "2014-01-29T16:28:23.000+0000" }, { "id": "415060", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as the issue mentioned here is not our bug.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-22T21:55:16.000+0000", "updated": "2017-03-22T21:55:16.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }