{ "id": "118693", "key": "TIMOB-14904", "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": "15691", "description": "2013 Sprint 19", "name": "2013 Sprint 19", "archived": true, "released": true, "releaseDate": "2013-09-20" }, { "id": "15693", "description": "2013 Sprint 19 API", "name": "2013 Sprint 19 API", "archived": true, "released": true, "releaseDate": "2013-09-20" } ], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2013-08-27T09:09:29.000+0000", "created": "2013-08-16T23:07:42.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [ { "id": "15478", "description": "Release 3.1.1", "name": "Release 3.1.1", "archived": true, "released": true, "releaseDate": "2013-06-17" }, { "id": "15479", "description": "Release 3.1.2", "name": "Release 3.1.2", "archived": true, "released": true, "releaseDate": "2013-07-31" } ], "issuelinks": [ { "id": "31316", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "114532", "key": "TIMOB-13901", "fields": { "summary": "iOS: ListView: Cannot set dynamic height on ItemTemplate (Ti.UI.SIZE)", "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": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-09T19:05:07.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": "While working with a ListView, in the template definition the customer is using heights defined by Ti.UI.SIZE, the listView looks compressed and is not getting the correct space to draw the UI components.\r\n\r\nThe expected behavior is the same as android, using the test case on android, the ListView shows correctly\r\nAttaching screen shots\r\n\r\ntest case:\r\n{code: title=index.js|borderStyle=solid}\r\n\r\n\r\nvar myTemplate = {\r\n childTemplates: [\r\n { // Subtitle\r\n type: 'Ti.UI.Label', // Use a label for the subtitle\r\n bindId: 'emptyView', // Maps to a custom es_info property of the item data\r\n properties: { // Sets the label properties\r\n color: \"red\",\r\n height: Ti.UI.SIZE, \r\n top:10, height:20\r\n }\r\n \r\n },\r\n { // Title \r\n type: 'Ti.UI.ImageView', // Use a label for the title \r\n bindId: 'productImage', // Maps to a custom info property of the item data\r\n properties: { // Sets the label properties\r\n color: \"red\",\r\n left: 0, height: 90, width: 90\r\n }\r\n },\r\n { // Subtitle\r\n type: 'Ti.UI.Label', // Use a label for the subtitle\r\n bindId: 'prodTitle', // Maps to a custom es_info property of the item data\r\n properties: { // Sets the label properties\r\n color: \"red\",\r\n height: Ti.UI.SIZE, \r\n top: 10,\r\n left:100,\r\n font: { \r\n fontSize: 14,\r\n fontFamily: \"arial\"\r\n }\r\n }\r\n },\r\n { // Subtitle\r\n type: 'Ti.UI.Label', // Use a label for the subtitle\r\n bindId: 'serves', // Maps to a custom es_info property of the item data\r\n properties: { // Sets the label properties\r\n color: \"#D0AB77\",\r\n font: {\r\n fontSize: 14,\r\n fontFamily: \"arial\"\r\n },\r\n height: Ti.UI.SIZE,\r\n top:30, \r\n left: 110\r\n }\r\n },\r\n { // Subtitle\r\n type: 'Ti.UI.Label', // Use a label for the subtitle\r\n bindId: 'prodPrice', // Maps to a custom es_info property of the item data\r\n properties: { // Sets the label properties\r\n color: \"#D0AB77\",\r\n font: {\r\n fontSize: 14,\r\n fontFamily: \"arial\"\r\n },\r\n height: Ti.UI.SIZE,top:50, \r\n }\r\n },\r\n { // Image justified left\r\n type: 'Ti.UI.ImageView', // Use an image view for the image\r\n bindId: 'pic', // Maps to a custom pic property of the item data\r\n properties: { // Sets the image view properties\r\n layout:'horizontal',height: Ti.UI.SIZE,top:53, left: 190\r\n }\r\n },\r\n { // Image justified left\r\n type: 'Ti.UI.ImageView', // Use an image view for the image\r\n bindId: 'pic1', // Maps to a custom pic property of the item data\r\n properties: { // Sets the image view properties\r\n height: Ti.UI.SIZE,top:53,left: 200\r\n }\r\n },\r\n { // Image justified left\r\n type: 'Ti.UI.ImageView', // Use an image view for the image\r\n bindId: 'pic2', // Maps to a custom pic property of the item data\r\n properties: { // Sets the image view properties\r\n height: Ti.UI.SIZE,top:53,left: 210\r\n }\r\n },\r\n { // Image justified left\r\n type: 'Ti.UI.ImageView', // Use an image view for the image\r\n bindId: 'pic3', // Maps to a custom pic property of the item data\r\n properties: { // Sets the image view properties\r\n height: Ti.UI.SIZE,top:53,left: 220\r\n }\r\n },\r\n \r\n { // Image justified left\r\n type: 'Ti.UI.Button', // Use an image view for the image\r\n bindId: 'Buy', // Maps to a custom pic property of the item data\r\n properties:{\r\n backgroundImage: '/images/buy.png', \r\n title: 'Buy',\r\n color: '#fff2d8',\r\n width: 40,\r\n height: 20,\r\n top:50,\r\n left:100,\r\n textAlign: Ti.UI.TEXT_ALIGNMENT_CENTER\r\n }\r\n },\r\n { // Subtitle\r\n type: 'Ti.UI.Label', // Use a label for the subtitle\r\n bindId: 'nickname', // Maps to a custom es_info property of the item data\r\n properties: { // Sets the label properties\r\n color: \"red\",\r\n font: { fontFamily:\"arial\", fontSize: 14,borderColor: \"#cba77a\",color:\"blue\" },\r\n left: 10,height: 'auto', top:60, bottom:10\r\n }\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 height:'70%',top:'19%'\r\n \r\n});\r\nvar sections = [];\r\nvar fruitSection = Ti.UI.createListSection();\r\n\r\nvar data = [];\r\nvar length = 7;\r\n\r\nfor (var i = 0; i < length; i++) {\r\n data.push({\r\n\r\n productImage: {image : \"/images/apple.png\"}, \r\n prodTitle: {text: \"ProductTitle\"},\r\n serves: {text: \"Serves NumberOfServings\"},\r\n prodPrice: {text: \" $ProductPrice\"},\r\n Buy:{text: \"Buy\"},\r\n pic: {image: '/images/star.png'},\r\n pic1: {image: '/images/star.png'},\r\n pic2: {image: '/images/star.png'},\r\n pic3: {image: '/images/star.png'}\r\n \r\n });\r\n}\r\n\r\n\r\n\r\nfruitSection.setItems(data);\r\nsections.push(fruitSection);\r\nlistView.setSections(sections);\r\n\r\n$.win.add(listView);\r\n$.win.open();\r\n\r\n{code}\r\n", "attachment": [ { "id": "41689", "filename": "device-2013-08-16-155726.png", "author": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "created": "2013-08-16T23:07:42.000+0000", "size": 76085, "mimeType": "image/png" }, { "id": "41690", "filename": "Screen Shot 2013-08-16 at 3.56.59 PM.png", "author": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "created": "2013-08-16T23:07:42.000+0000", "size": 61794, "mimeType": "image/png" } ], "flagged": false, "summary": "ListView: iOS is not setting Ti.UI.SIZE for the UI elements", "creator": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "subtasks": [], "reporter": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "environment": "Titanium SDK: 3.1.1.GA / 3.1.2.GA\r\niOS: Simulator 6.1\r\nTitanium Studio: 3.1.2.201308091617\r\n", "comment": { "comments": [ { "id": "268144", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "For now, they need to set the size specifically on iOS, as we don't yet support dynamic row heights. See related ticket for that fix.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-26T17:28:55.000+0000", "updated": "2013-08-26T17:28:55.000+0000" }, { "id": "268320", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "The default behavior of ListItem on IOS is not SIZE for height. When height is not specified either in the template or in the data, the height is default value (44 dip). Add properties:{height:90} either to the template or the data to render the full image correctly. 90 because that is the largest element in your template.", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-08-27T09:09:29.000+0000", "updated": "2013-08-27T09:09:29.000+0000" }, { "id": "410336", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as invalid.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-09T19:05:07.000+0000", "updated": "2017-03-09T19:05:07.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }