{ "id": "118403", "key": "TIMOB-14851", "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": "15597", "description": "2013 Sprint 17", "name": "2013 Sprint 17", "archived": true, "released": true, "releaseDate": "2013-08-23" }, { "id": "15599", "description": "2013 Sprint 17 API", "name": "2013 Sprint 17 API", "archived": true, "released": true, "releaseDate": "2013-08-23" } ], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2013-08-13T17:22:52.000+0000", "created": "2013-08-13T12:11:55.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "regression" ], "versions": [ { "id": "15478", "description": "Release 3.1.1", "name": "Release 3.1.1", "archived": true, "released": true, "releaseDate": "2013-06-17" } ], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-03T22:04:18.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": "Label background image doesn't get displayed without giving `height` and `width`. Here are the steps to reproduce the issue : \r\n\r\n1. Create a new Titanium project.\r\n2. Copy and paste the below code to the app.js :\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor : 'white'\r\n});\r\nvar label = Ti.UI.createLabel({\r\n\t\tleft : 0,\r\n\t\tbackgroundImage : 'sample.png'\r\n\t});\r\n\t\r\nwin.add(label);\r\nwin.open();\r\n{code}\r\n3. Make sure Titanium SDK is set `3.1.1` in tiapp.xml.\r\n4. See the result. Background image is not visible.\r\n5. Now add `height` and `width` to the label like:\r\n\r\n{code}\r\nvar label = Ti.UI.createLabel({\r\n\t\tleft : 0,\r\n\t\theight:30,\r\n\t\twidth:30,\r\n\t\tbackgroundImage : 'sample.png'\r\n\t});\r\n{code}\r\n\r\n6. Background image of the label should visible in the tableView row.\r\n\r\nNote : This behavior is not shown in SDK 2.1.4.\r\n", "attachment": [], "flagged": false, "summary": "iOS: Label background image doesn't get displayed without giving `height` and `width`", "creator": { "name": "mpathak", "key": "mpathak", "displayName": "Meenakshi Pathak", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "mpathak", "key": "mpathak", "displayName": "Meenakshi Pathak", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "TiSDK 2.1.4, TiSDK 3.1.1, iOS 6,IOS 7", "comment": { "comments": [ { "id": "266244", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Label by default follows `SIZE` behavior. That means if you don't specify a width or height the label would assume the size of the text it's supposed contain. In the given test case there is no text, so the computed size would return 0 and that is the expected behavior. If you provide any text to the label(even if it is empty space) the label will show on screen. \n\nRefer to http://docs.appcelerator.com/titanium/latest/#!/guide/Transitioning_to_the_New_UI_Layout_System for more information.\n\nThe fact it worked in 2.1.4, is due to a bug that was not fixed at that point.\n\nMarking ticket as invalid. \n", "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-13T17:22:37.000+0000", "updated": "2013-08-13T17:22:37.000+0000" }, { "id": "408951", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing as invalid.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-03T22:04:18.000+0000", "updated": "2017-03-03T22:04:18.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }