{ "id": "145770", "key": "AC-3269", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2015-09-29T05:31:54.000+0000", "created": "2015-03-16T05:31:42.000+0000", "labels": [ "SupportTeam", "android", "ios" ], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:57:41.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": "14545", "name": "Documentation" } ], "description": "Hi All,\r\n Please look at the forum link http://developer.appcelerator.com/question/181384/adding-multiple-labels-into-list-item\r\n\r\nI want to add children (N number of Labels) into ListView's custom templates children view at the time of Network call success,\r\nI will come to know the count of Labels after the web service call response only, So i want to create/add labels on that place, But its seems to we can't do it Since the children views are read only. Please let me know if there is any solution?\r\nReason for the need:\r\nAssume the description is posted by user along with image,\r\nI am at #Chennai with @Simbu, @Raj\r\nHere i need to display the # word with Blue color, @word with Pink color, and clicking on #word will takes to search page, @name will takes to that persons profile page, Like Instagram app.", "attachment": [], "flagged": false, "summary": "Adding Multiple labels into ListView child view", "creator": { "name": "simbu", "key": "simbu", "displayName": "Silambarasan Raman", "active": true, "timeZone": "Asia/Kolkata" }, "subtasks": [], "reporter": { "name": "simbu", "key": "simbu", "displayName": "Silambarasan Raman", "active": true, "timeZone": "Asia/Kolkata" }, "environment": "ios, android, mac os x 10.9.5", "comment": { "comments": [ { "id": "346336", "author": { "name": "simbu", "key": "simbu", "displayName": "Silambarasan Raman", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Hi Team,\r\nCan you respond? I am awaiting for your response.", "updateAuthor": { "name": "simbu", "key": "simbu", "displayName": "Silambarasan Raman", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2015-03-18T06:01:12.000+0000", "updated": "2015-03-18T06:01:12.000+0000" }, { "id": "347423", "author": { "name": "simbu", "key": "simbu", "displayName": "Silambarasan Raman", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Hello Team,\r\n\r\nStill awaiting for your response", "updateAuthor": { "name": "simbu", "key": "simbu", "displayName": "Silambarasan Raman", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2015-03-26T09:52:35.000+0000", "updated": "2015-03-26T09:52:35.000+0000" }, { "id": "362408", "author": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello,\r\n\r\nWe can do it using Listview template. [ListView Guide|http://docs.appcelerator.com/platform/latest/#!/guide/ListViews]\r\n\r\n*Testing Environment*\r\nCommand-Line Interface, version 4.1.2,\r\nTi SDK: 4.1.0.GA,\r\nPlatform: Android, iOS\r\nStudio Version: 4.1.1\r\n\r\n*Test Code*\r\n{code:title=app.js}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor : 'white'\r\n});\r\n\r\nvar sections = [];\r\n\r\n var template = {\r\n\r\n childTemplates: [\r\n {\r\n\r\n\t\t type: 'Ti.UI.View',\r\n\t\t id: 'detailView' ,\r\n\t\t properties: {\r\n\t\t backgroundColor: \"#fff\",\r\n\t\t left:0,\r\n\t\t width: 220\r\n\r\n },\r\n\r\n childTemplates: [\r\n {\r\n\t\t\t\t\t\t type: 'Ti.UI.Label',\r\n\t\t\t\t\t\t bindId: 'title',\r\n\t\t\t\t\t\t id: 'title',\r\n\t\t\t\t\t\t properties: {\r\n\t\t\t\t\t\t color: 'black',\r\n\t\t\t\t\t\t font: { fontFamily:'Arial', fontSize: 14, fontWeight:'bold' },\r\n\t\t\t\t\t\t left: 10,\r\n\t\t\t\t\t\t top: 10,\r\n\t\t\t\t\t\t width: 200\r\n\t\t\t\t\t\t },\r\n\t\t\t\t\t\t events: {\r\n\t\t\t\t\t\t click:clickTitle\r\n\t\t\t\t\t\t }\r\n\r\n },\r\n {\r\n\t\t\t\t\t\t type: 'Ti.UI.Label',\r\n\t\t\t\t\t\t bindId: 'subtitle',\r\n\t\t\t\t\t\t id: 'subtitle',\r\n\t\t\t\t\t\t properties: {\r\n\t\t\t\t\t\t color: 'black',\r\n\t\t\t\t\t\t font: { fontFamily:'Arial', fontSize: 10 },\r\n\t\t\t\t\t\t left: 10,\r\n\t\t\t\t\t\t top: 30,\r\n\t\t\t\t\t\t width: 200\r\n\t\t\t\t\t\t },\r\n\t\t\t\t\t\t events: {\r\n\t\t\t\t\t\t click:clickSubTitle\r\n\t\t\t\t\t\t }\r\n },\r\n {\r\n\t\t\t\t\t\t type: 'Ti.UI.Label',\r\n\t\t\t\t\t\t bindId: 'meta',\r\n\t\t\t\t\t\t id: 'meta',\r\n\t\t\t\t\t\t properties: {\r\n\t\t\t\t\t\t color: 'gray',\r\n\t\t\t\t\t\t font: { fontFamily:'Arial', fontSize: 10 },\r\n\t\t\t\t\t\t left: 10,\r\n\t\t\t\t\t\t top: 45,\r\n\t\t\t\t\t\t width: 200\r\n\t\t\t\t\t\t },\r\n\t\t\t\t\t\t events: {\r\n\t\t\t\t\t\t click:clickMeta\r\n\t\t\t\t\t\t }\r\n \t\t\t\t\t},\r\n\r\n\t\t\t\t ],\r\n\r\n\t \t\t},\r\n\r\n \t\t],\r\n\r\n \t};\r\n\r\n\r\nvar listView = Ti.UI.createListView({\r\n\ttemplates : {\r\n\t\t'template' : template\r\n\t},\r\n\tdefaultItemTemplate : 'template',\r\n\r\n});\r\n\r\nfunction clickTitle() {\r\n\talert('You Click Title');\r\n}\r\n\r\nfunction clickSubTitle() {\r\n\talert('You Click SubTitle');\r\n}\r\n\r\nfunction clickMeta() {\r\n\talert('You Click Meta');\r\n}\r\n\r\nvar listSection = Ti.UI.createListSection();\r\n\r\nvar ListItem = [];\r\n\r\nfor (var i = 0; i < 20; i++) {\r\n\tListItem.push({\r\n\t\ttitle : {\r\n\t\t\ttext : 'Appcelerator'\r\n\t\t},\r\n\t\tsubtitle : {\r\n\t\t\ttext : 'Mobile Software'\r\n\t\t},\r\n\t\tmeta : {\r\n\t\t\ttext : '25077 followers'\r\n\t\t},\r\n\t\tproperties : {\r\n\t\t\ttop : 5,\r\n\t\t\theight : 70,\r\n\t\t\tbackgroundColor : \"#EEE\"\r\n\t\t}\r\n\t});\r\n};\r\n\r\n\r\nlistSection.setItems(ListItem);\r\nsections.push(listSection);\r\nlistView.setSections(sections);\r\nwin.add(listView);\r\nwin.open(); \r\n{code}\r\n\r\nThanks.\r\n", "updateAuthor": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-09-07T07:08:09.000+0000", "updated": "2015-09-29T05:31:40.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }