{ "id": "170633", "key": "TIMOB-25615", "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": null, "resolutiondate": null, "created": "2017-12-15T15:04:38.000+0000", "priority": null, "labels": [ "engReviewed" ], "versions": [], "issuelinks": [], "assignee": null, "updated": "2019-07-30T17:31:34.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [], "description": "*ListItem's height* property doesn't set the *height* of ListItem as it's mentioned in the docs at here: http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.ListItem-property-height\r\n\r\nMoreover, *height* property is listed as a direct property for *ListItem* since *Ti SDK 3.1.0* instead as an accessor or inherited property, so it is simply supposed to work irrespective of any *Ti SDK*.\r\n\r\nAlso, it is not mentioned anywhere that how users can set a *fixed height* to a *list-item*, so it's clueless for anyone who wants to set a fixed height. \r\n\r\nI have tried this stuff on *Ti SDK 7.0.0.GA* for both iOS & Android & it doesn't just work on any platform. I couldn't try it on older SDK as I only have 7.0.0.GA.\r\n\r\nHere's the very sample code picked from doc itself:\r\n\r\n\r\n{code:java}\r\n\r\n\t\r\n\t\t\r\n\t \r\n\t \r\n\t \r\n\t \r\n\t \r\n\t\r\n\r\n{code}\r\n\r\nI have also attached a sample of how it look like on iOS 11.\r\n\r\nOne of the user in Ti-Slack told me that it only works if we use a class property on ItemTemplate & set height, backgroundColor on class. Here's what he meant:\r\n\r\n\r\n\r\n{code:java}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\".saini\" : { height : 70, backgroundColor:'red' }\r\n{code}\r\n\r\nThen only it works but again here's a glitch that if you try to set any property directly in XML, it doesn't work. It works only through a class defined in *.tss* file & it also creates below log warnings:\r\n\r\n\r\n{code:java}\r\n[WARN] : Could not retrieve template for SIZE measurement\r\n[WARN] : Could not retrieve template for SIZE measurement\r\n[WARN] : Could not retrieve template for SIZE measurement\r\n[WARN] : Could not retrieve template for SIZE measurement\r\n{code}\r\n\r\n\r\nSo, it's pretty clear that things are not working at all as they should be. Either way, there's an issue. \r\nThanks\r\n\r\n", "attachment": [ { "id": "63823", "filename": "Screen Shot 2017-12-16 at 12.49.12 AM.png", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2017-12-15T21:48:28.000+0000", "size": 64416, "mimeType": "image/png" }, { "id": "63819", "filename": "Simulator Screen Shot - iPhone 5s - 2017-12-15 at 20.32.35.png", "author": { "name": "prashant_saini", "key": "prashant_saini", "displayName": "Prashant Saini", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-12-15T15:03:32.000+0000", "size": 33253, "mimeType": "image/png" }, { "id": "63820", "filename": "Simulator Screen Shot - iPhone 5s - 2017-12-15 at 21.03.21.png", "author": { "name": "prashant_saini", "key": "prashant_saini", "displayName": "Prashant Saini", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-12-15T15:33:38.000+0000", "size": 33521, "mimeType": "image/png" } ], "flagged": false, "summary": "ListItem height property doesn't work at all & no where it has been mentioned how to set a fixed height", "creator": { "name": "prashant_saini", "key": "prashant_saini", "displayName": "Prashant Saini", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "prashant_saini", "key": "prashant_saini", "displayName": "Prashant Saini", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Ti SDK 7.0.0.GA\r\niOS 11\r\nAndroid OS >= 5\r\n", "comment": { "comments": [ { "id": "432239", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, I couldn't reproduce the issue in my test. The listitem height does work for me. See screenshot. Can you try to set height without the ' ' ? For me, it works for both as string and value. Thanks. ", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2017-12-15T21:49:33.000+0000", "updated": "2017-12-15T21:51:04.000+0000" }, { "id": "432245", "author": { "name": "prashant_saini", "key": "prashant_saini", "displayName": "Prashant Saini", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I saw that your iOS simulator is version 11.2, but mine was 11.0 with Xcode 9. Can you try on same version & also it is not working on Android. So it's still a bug if it's not working on all iOS versions & Android version.", "updateAuthor": { "name": "prashant_saini", "key": "prashant_saini", "displayName": "Prashant Saini", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-12-16T03:49:56.000+0000", "updated": "2017-12-16T03:49:56.000+0000" }, { "id": "432250", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello [~prashant_saini]< I was able to reproduce the issue for Android. The listitem height does not work in Android. But works on iOS. Moving to TIMOB. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2017-12-16T19:42:08.000+0000", "updated": "2017-12-16T19:42:08.000+0000" }, { "id": "432257", "author": { "name": "prashant_saini", "key": "prashant_saini", "displayName": "Prashant Saini", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Sharif AbuDarda, I am sure it also doesn't work for iOS even on my machine, therefore I am mentioning the info retrieved by `appc info` command to make sure you can test & confirm on same environment:\r\n\r\n*Operating System*\r\n Name = Mac OS X\r\n Version = 10.12.6 \r\n\r\n*Node.js*\r\n Node.js Version = 8.9.3\r\n npm Version = 5.5.1\r\n\r\n*Appcelerator CLI*\r\n Installer = 4.2.11\r\n Core Package = 7.0.0\r\n\r\n*Titanium CLI*\r\n CLI Version = 5.0.14\r\n node-appc Version = 0.2.41\r\n\r\n*Titanium SDKs*\r\n 7.0.0.GA\r\n Version = 7.0.0\r\n Install Location = /Users/prashant/Library/Application Support/Titanium/mobilesdk/osx/7.0.0.GA\r\n Platforms = iphone, android\r\n node-appc Version = 0.2.43\r\n\r\n*Xcode*\r\n 9.0 (build 9A235) - Xcode default\r\n Install Location = /Applications/Xcode.app/Contents/Developer\r\n iOS SDKs = 11.0\r\n iOS Simulators = 11.0\r\n Watch SDKs = none\r\n Watch Simulators = none\r\n Supported by TiSDK 7.0.0.GA = yes\r\n EULA Accepted = yes\r\n ", "updateAuthor": { "name": "prashant_saini", "key": "prashant_saini", "displayName": "Prashant Saini", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-12-17T09:39:35.000+0000", "updated": "2017-12-17T09:39:35.000+0000" }, { "id": "434799", "author": { "name": "btknorr", "key": "btknorr", "displayName": "Brian Knorr", "active": true, "timeZone": "America/Chicago" }, "body": "We are seeing this same issue in iOS...getting a ton of these on our list views: [WARN] Could not retrieve template for SIZE measurement", "updateAuthor": { "name": "btknorr", "key": "btknorr", "displayName": "Brian Knorr", "active": true, "timeZone": "America/Chicago" }, "created": "2018-02-22T23:44:22.000+0000", "updated": "2018-02-22T23:44:22.000+0000" }, { "id": "449350", "author": { "name": "ahutton", "key": "ahutton", "displayName": "Alan Hutton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~amukherjee] I can reproduce the issue under SDK 8.0.2.GA. Still investigating.", "updateAuthor": { "name": "ahutton", "key": "ahutton", "displayName": "Alan Hutton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-06-25T22:00:53.000+0000", "updated": "2019-06-25T22:00:53.000+0000" }, { "id": "449353", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Right. Despite what our docs state, you cannot set the {{ListViewItem}} object's \"height\". You cannot set it during creation. Nor can you change it dynamically with a call to {{updateItemAt()}}. This is true on both Android and iOS.\r\n\r\nThe ListView item's \"height\" must be specified by the template.\r\n\r\nSo, if you want different ListView items to have different heights, then your only option available \"today\" is to create multiple templates with different heights. A ListView item has a \"template\" property which you can set dynamically.\r\n\r\nHave a look at the \"List Items with an Item Template\" example in the link below. It shows how to use 2 templates (\"plainTemplate\" and \"redTemplate\"). You can apply similar logic to have different heights instead.\r\nhttps://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.ListItem\r\n", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-06-25T22:40:06.000+0000", "updated": "2019-06-25T22:40:06.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }