{ "id": "171992", "key": "AC-5821", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "8", "description": "", "name": "Needs more info" }, "resolutiondate": "2018-08-13T19:19:37.000+0000", "created": "2018-08-02T00:16:38.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2018-08-13T19:19:38.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14551", "name": "Studio", "description": "Please enter tickets related to Titanium Studio here." } ], "description": "The below code works in iOS and but not in Android, the elements in the childtemplate are not displaying in the Android emulator.\r\n\r\n{code:js}\r\nvar myTemplate = {\r\n childTemplates: [\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 width: '70dp', height: '70dp', left: 0\r\n }\r\n },\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: '#000',\r\n font: { fontFamily:'Arial', fontSize: '20dp', fontWeight:'bold' },\r\n left: '80dp', top: 5,\r\n }\r\n },\r\n { // Subtitle\r\n type: 'Ti.UI.Label', // Use a label for the subtitle\r\n bindId: 'es_info', // Maps to a custom es_info property of the item data\r\n properties: { // Sets the label properties\r\n color: 'gray',\r\n font: { fontFamily:'Arial', fontSize: '14dp' },\r\n left: '80dp', bottom: '5',\r\n }\r\n }\r\n ]\r\n};\r\n \r\nvar listView = $.dynamicListView;\r\nlistView.templates={ 'plain': myTemplate};\r\nlistView.defaultItemTemplate=\"plain\";\r\n\r\n\r\nfor (var i = 0; i < cats[0].category.length; i++) {\r\n \r\n var section = Ti.UI.createListSection({ headerView: createCustomView(cats[0].category[i].name)});\r\n \r\n //Ti.API.info(tasks[0].category[i].name);\r\n //clear data\r\n\tvar data = [];\r\n \r\n for (var d = 0; d < cats[0].category[i].data.length; d++) {\r\n data.push({\r\n\r\n pic : { image : cats[0].category[i].data[d].image },\r\n info : { text: cats[0].category[i].data[d].name },\r\n es_info : { text : cats[0].category[i].data[d].description },\r\n\r\n // Sets the regular list data properties\r\n properties : {\r\n itemId: cats[0].category[i].data[d].id,\r\n name: cats[0].category[i].data[d].name,\r\n description: cats[0].category[i].data[d].description,\r\n image: cats[0].category[i].data[d].image,\r\n video: cats[0].category[i].data[d].video,\r\n videoURL: cats[0].category[i].data[d].videoURL,\r\n audio: cats[0].category[i].data[d].audio,\r\n audioURL: cats[0].category[i].data[d].audioURL,\r\n storeid: cats[0].category[i].data[d].storeid\r\n }\r\n });\r\n }\r\n \r\nsection.setItems(data);\r\n//sections.push(section);\r\nlistView.appendSection(section);\r\n{code}", "attachment": [ { "id": "65409", "filename": "Android_Emulator_-_Pixel_API_24_5554.png", "author": { "name": "rene@appsinteractive.com", "key": "rene@appsinteractive.com", "displayName": "rene@appsinteractive.com", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-08-02T00:15:18.000+0000", "size": 96962, "mimeType": "image/png" } ], "flagged": false, "summary": "ListView Template not working correctly on Android", "creator": { "name": "rene@appsinteractive.com", "key": "rene@appsinteractive.com", "displayName": "rene@appsinteractive.com", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "rene@appsinteractive.com", "key": "rene@appsinteractive.com", "displayName": "rene@appsinteractive.com", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Mac OS", "comment": { "comments": [ { "id": "439778", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "I think parts of your example is missing, like the declaration of {{cats}}. Can you provide a standalone example that fits in an app.js?", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-08-03T12:19:46.000+0000", "updated": "2018-08-03T12:19:46.000+0000" }, { "id": "439782", "author": { "name": "rene@appsinteractive.com", "key": "rene@appsinteractive.com", "displayName": "rene@appsinteractive.com", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Here is cat which includes JSON.\r\n\r\nvar cats = [\r\n\t { \"category\": [\r\n\t\t \t\t\t {\r\n\t\t\t \"name\": \"Category\",\r\n\t\t\t \"data\": [\r\n\t\t\t {\r\n\t\t\t \"id\": \"3\",\r\n\t\t\t \"name\": \"Sample1\",\r\n\t\t\t \"description\": \"\",\r\n\t\t\t \"video\":\"\",\r\n\t\t\t \"videoURL\":\"\",\r\n\t\t\t \"audio\":\"sample.mp3\",\r\n\t\t\t \"audioURL\":\"https://www.dropbox.com/\",\r\n\t\t\t \"image\":\"video-icon.png\",\r\n\t\t\t \"type\":\"audio\",\r\n\t\t \t\"storeid\":\"sample1\"\r\n\t\t\t },\r\n\t\t\t {\r\n\t\t\t \"id\": \"4\",\r\n\t\t\t \"name\": \"Sample2\",\r\n\t\t\t \"description\": \"\",\r\n\t\t\t \"video\":\"\",\r\n\t\t\t \"videoURL\":\"\",\r\n\t\t\t \"audio\":\"sample2.mp3\",\r\n\t\t\t \"audioURL\":\"https://www.dropbox.com/\",\r\n\t\t\t \"image\":\"video-icon.png\",\r\n\t\t\t \"type\":\"audio\",\r\n\t\t \t\"storeid\":\"sample2\"\r\n\t\t\t },\r\n\t\t\t {\r\n\t\t\t \"id\": \"4\",\r\n\t\t\t \"name\": \"sample3\",\r\n\t\t\t \"description\": \"\",\r\n\t\t\t \"video\":\"\",\r\n\t\t\t \"videoURL\":\"\",\r\n\t\t\t \"audio\":\"sample3.mp3\",\r\n\t\t\t \"audioURL\":\"/sample3.mp3\",\r\n\t\t\t \"image\":\"video-icon.png\",\r\n\t\t\t \"type\":\"audio\",\r\n\t\t \t\"storeid\":\"sample3\"\r\n\t\t\t }\r\n\t\t\t ]}\r\n\t\t ]\r\n\t\t}\r\n\t];", "updateAuthor": { "name": "rene@appsinteractive.com", "key": "rene@appsinteractive.com", "displayName": "rene@appsinteractive.com", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-08-03T17:04:51.000+0000", "updated": "2018-08-03T17:04:51.000+0000" }, { "id": "439815", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, We need a full reproducible sample code in an app.js file or as a sample project. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2018-08-06T16:46:50.000+0000", "updated": "2018-08-06T16:46:50.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }