{ "id": "169878", "key": "TIMOB-25337", "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": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2017-10-10T08:34:03.000+0000", "created": "2017-09-24T09:01:46.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "consider-6.2.3", "ios", "listview", "regression" ], "versions": [ { "id": "19542", "description": "", "name": "Release 6.2.2", "archived": false, "released": true, "releaseDate": "2017-09-19" }, { "id": "18414", "description": "", "name": "Release 6.2.0", "archived": false, "released": true, "releaseDate": "2017-09-13" }, { "id": "19922", "description": "", "name": "Release 6.2.1", "archived": false, "released": true, "releaseDate": "2017-09-18" } ], "issuelinks": [ { "id": "55996", "type": { "id": "10122", "name": "Gantt: start-finish", "inward": "is triggered by", "outward": "is triggering" }, "inwardIssue": { "id": "160433", "key": "TIMOB-23436", "fields": { "summary": "iOS: ListView Control's height not setting 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 } } } } ], "assignee": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2018-08-06T17:37:00.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": "I noticed that custom item-templates will size by default on 6.2.0. It's no blocker as the developer can just set a height of 43 which is the default cell-height, but ideally, we should address that in the height-calculation of the TiUIListView.m already.\r\n\r\n*EDIT*: It's actually a regression from TIMOB-23436. Reverting the change resolves this issue, so we need to find a better way to fix TIMOB-23436.\r\n\r\nTest-Case:\r\n{code:js}\r\nvar win = Ti.UI.createWindow({backgroundColor: 'white'});\r\n\r\nvar myTemplate = {\r\n childTemplates: [\r\n { // Title \r\n type: 'Ti.UI.Label', // Use a label for the title \r\n bindId: 'info', // Maps to a custom info property of the item data\r\n properties: { // Sets the label properties\r\n color: 'red',\r\n }\r\n }\r\n ]\r\n};\r\n\r\nvar listView = Ti.UI.createListView({\r\n templates: { 'template': myTemplate },\r\n defaultItemTemplate: 'template'\r\n});\r\nvar sections = [];\r\n\r\nvar fruitSection = Ti.UI.createListSection({ headerTitle: 'Fruits / Frutas'});\r\nvar fruitDataSet = [\r\n { info: {text: 'Apple'}},\r\n { info: {text: 'Banana'}}\r\n];\r\nfruitSection.setItems(fruitDataSet);\r\nsections.push(fruitSection);\r\nlistView.setSections(sections);\r\n\r\nwin.add(listView);\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: Custom ListItem does not respect default row-height of 43px, sizing instead (regression)", "creator": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "closedSprints": [ { "id": 959, "state": "closed", "name": "2017 Sprint 21 SDK", "startDate": "2017-10-08T20:38:15.130Z", "endDate": "2017-10-22T20:38:00.000Z", "completeDate": "2017-10-24T23:55:56.605Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "428731", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "In this it is calculating height of label and accordingly it is setting height of cell if height of cell is not set explicitly. I think it is right. Lets take following test case -\r\n\r\n{code:java}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: '#fff'\r\n});\r\nvar myTemplate = {\r\n childTemplates: [{\r\n type: 'Ti.UI.ImageView',\r\n bindId: 'pic'\r\n }]\r\n};\r\nvar list = Ti.UI.createListView({\r\n templates:{'template':myTemplate},\r\n defaultItemTemplate: 'template',\r\n});\r\nvar sections = [];\r\nvar imgSection = Ti.UI.createListSection({headerTitle:'Test Image Template'});\r\nvar listItems = [];\r\nfor (var i = 0; i < 5; i++) {\r\n listItems.push({pic:\r\n {image : 'image.JPG'}\r\n });\r\n}\r\nimgSection.setItems(listItems);\r\nsections.push(imgSection);\r\nlist.setSections(sections);\r\nwin.add(list);\r\nwin.open();\r\n{code}\r\n \r\nIn this example image is getting set in cell. If we are not sure how much size we should give the cell, in this case it will calculate the height according to image and will return cell height. \r\n\r\nIf we return default cell-height, 43, image will not fit properly in cell.\r\n\r\nThere is always an option for developer to set height of cell .\r\n\r\nI think we can make this issue 'invalid'. [~emerriman]/[~hknoechel] thought ?", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-10-05T07:12:21.000+0000", "updated": "2017-10-09T08:33:52.000+0000" }, { "id": "439908", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as invalid. If incorrect, please reopen.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-08-06T17:37:00.000+0000", "updated": "2018-08-06T17:37:00.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }