{ "id": "172699", "key": "TIMOB-26627", "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": "19882", "name": "Release 8.0.0", "archived": false, "released": true, "releaseDate": "2019-03-14" } ], "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2019-03-26T17:42:14.000+0000", "created": "2018-12-04T12:23:18.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [ "android", "listView" ], "versions": [ { "id": "20429", "name": "Release 7.5.1", "archived": false, "released": true, "releaseDate": "2019-02-26" } ], "issuelinks": [], "assignee": { "name": "ahutton", "key": "ahutton", "displayName": "Alan Hutton", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2019-03-26T17:42:14.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": [], "description": "*Issue Overview:*\r\nIssue is while updating listview, lable having attribute string goes disappear (Refer to the attached screenshot). This doesn't happen on ti sdk 7.4.0.GA. \r\n\r\n*Steps to reproduce:*\r\n1. Run the test code using sdk 7.5.0.GA\r\n2. Click text \"Manzana\"\r\n3. Observe that the attributed string \"Have you tried hyperloop1 yet\" goes disappear.\r\nNow, run the test code using 7.4.0.GA and follow the steps again. Observe that, on 7.4.0.GA, the attributed string does not disappear.\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor : 'white'\r\n});\r\nvar text = \"Have you tried hyperloop1 yet?\";\r\n// Create a custom template that displays an image on the left,\r\n// then a title next to it with a subtitle below it.\r\nvar myTemplate = {\r\n\tchildTemplates : [{// Image justified left\r\n\t\ttype : 'Ti.UI.ImageView', // Use an image view for the image\r\n\t\tbindId : 'pic', // Maps to a custom pic property of the item data\r\n\t\tproperties : {// Sets the image view properties\r\n\t\t\twidth : '50dp',\r\n\t\t\theight : '50dp',\r\n\t\t\tleft : 0\r\n\t\t}\r\n\t}, {// Title\r\n\t\ttype : 'Ti.UI.Label', // Use a label for the title\r\n\t\tbindId : 'info', // Maps to a custom info property of the item data\r\n\t\tproperties : {// Sets the label properties\r\n\t\t\tcolor : 'black',\r\n\t\t\tfont : {\r\n\t\t\t\tfontFamily : 'Arial',\r\n\t\t\t\tfontSize : '20dp',\r\n\t\t\t\tfontWeight : 'bold'\r\n\t\t\t},\r\n\t\t\tleft : '60dp',\r\n\t\t\ttop : 0,\r\n\t\t\tattributedString : Ti.UI.createAttributedString({\r\n\t\t\t\ttext : text,\r\n\t\t\t\tattributes : [{\r\n\t\t\t\t\ttype : Ti.UI.ATTRIBUTE_UNDERLINES_STYLE,\r\n\t\t\t\t\tvalue : Ti.UI.ATTRIBUTE_UNDERLINE_STYLE_SINGLE, // Ignored by Android only displays a single line\r\n\t\t\t\t\trange : [text.indexOf('hyperloop1'), ('hyperloop1').length]\r\n\t\t\t\t}]\r\n\t\t\t})\r\n\t\t}\r\n\t}, {// Subtitle\r\n\t\ttype : 'Ti.UI.Label', // Use a label for the subtitle\r\n\t\tbindId : 'es_info', // Maps to a custom es_info property of the item data\r\n\t\tproperties : {// Sets the label properties\r\n\t\t\tcolor : 'gray',\r\n\t\t\tfont : {\r\n\t\t\t\tfontFamily : 'Arial',\r\n\t\t\t\tfontSize : '14dp'\r\n\t\t\t},\r\n\t\t\tleft : '60dp',\r\n\t\t\ttop : '25dp',\r\n\t\t}\r\n\t}]\r\n};\r\n\r\nvar listView = Ti.UI.createListView({\r\n\t// Maps myTemplate dictionary to 'template' string\r\n\ttemplates : {\r\n\t\t'template' : myTemplate\r\n\t},\r\n\t// Use 'template', that is, the myTemplate dict created earlier\r\n\t// for all items as long as the template property is not defined for an item.\r\n\tdefaultItemTemplate : 'template'\r\n});\r\n\r\nlistView.addEventListener('itemclick', function(e) {\r\n\r\n\tvar item = e.section.getItemAt(e.itemIndex);\r\n\titem.es_info.text = \"text changed\";\t\r\n\tlistView.sections[0].updateItemAt(e.itemIndex, item);\r\n\t\r\n\t//\r\n\t//\r\n\t//\r\n\t\r\n});\r\n\r\nvar sections = [];\r\n\r\nvar fruitSection = Ti.UI.createListSection({\r\n\theaderTitle : 'Fruits / Frutas'\r\n});\r\n\r\nvar fruitDataSet = [\r\n// the text property of info maps to the text property of the title label\r\n// the text property of es_info maps to text property of the subtitle label\r\n// the image property of pic maps to the image property of the image view\r\n{\r\n\t/*info : {\r\n\t //text : 'Apple'\r\n\t attributedString : Ti.UI.createAttributedString({\r\n\t text: text,\r\n\t attributes: [\r\n\t {\r\n\t type: Ti.UI.ATTRIBUTE_UNDERLINES_STYLE,\r\n\t value: Ti.UI.ATTRIBUTE_UNDERLINE_STYLE_SINGLE, // Ignored by Android only displays a single line\r\n\t range: [text.indexOf('hyperloop'), ('hyperloop').length]\r\n\t }\r\n\t ]\r\n\t }),\r\n\t },*/\r\n\tes_info : {\r\n\t\ttext : 'Manzana'\r\n\t},\r\n\tpic : {\r\n\t\timage : 'apple.png'\r\n\t}\r\n}];\r\n\r\nfruitSection.setItems(fruitDataSet);\r\nsections.push(fruitSection);\r\nlistView.setSections(sections);\r\nwin.add(listView);\r\nwin.open(); \r\n{code}\r\n\r\n", "attachment": [ { "id": "65945", "filename": "Screenshot_20181204_162105.jpg", "author": { "name": "jnaher", "key": "jnaher", "displayName": "Jebun Naher", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2018-12-04T12:22:48.000+0000", "size": 48902, "mimeType": "image/jpeg" }, { "id": "65944", "filename": "Screenshot_20181204_162109.jpg", "author": { "name": "jnaher", "key": "jnaher", "displayName": "Jebun Naher", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2018-12-04T12:22:56.000+0000", "size": 32976, "mimeType": "image/jpeg" } ], "flagged": false, "summary": "Android: While updating listview, lable having attribute string goes disappear 7.5.0.GA", "creator": { "name": "jnaher", "key": "jnaher", "displayName": "Jebun Naher", "active": false, "timeZone": "Asia/Dhaka" }, "subtasks": [], "reporter": { "name": "jnaher", "key": "jnaher", "displayName": "Jebun Naher", "active": false, "timeZone": "Asia/Dhaka" }, "environment": "Test Environment:\r\n\r\n{code}\r\nAppcelerator Command-Line Interface, version 7.0.7\r\nCopyright (c) 2014-2018, Appcelerator, Inc. All Rights Reserved.\r\n\r\nOperating System\r\n Name = Mac OS X\r\n Version = 10.13.6\r\n Architecture = 64bit\r\n # CPUs = 4\r\n Memory = 8.0GB\r\n\r\nNode.js\r\n Node.js Version = 8.9.1\r\n npm Version = 5.5.1\r\n\r\nAppcelerator CLI\r\n Installer = 4.2.13\r\n Core Package = 7.0.7\r\n\r\nTitanium CLI\r\n CLI Version = 5.1.1\r\n node-appc Version = 0.2.44\r\n\r\nTitanium SDKs Version = 7.5.0.GA & 7.4.0.GA\r\nDevice: Huawei Y9 2018(android 8)", "comment": { "comments": [ { "id": "445615", "author": { "name": "Andrea.Vitale", "key": "andrea.vitale", "displayName": "Andrea Vitale", "active": true, "timeZone": "Europe/Berlin" }, "body": "Same here!! :-(", "updateAuthor": { "name": "Andrea.Vitale", "key": "andrea.vitale", "displayName": "Andrea Vitale", "active": true, "timeZone": "Europe/Berlin" }, "created": "2019-01-24T11:50:49.000+0000", "updated": "2019-01-24T11:50:49.000+0000" }, { "id": "445616", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "body": "can you check it with 7.5.1.RC? https://github.com/appcelerator/titanium_mobile/pull/10611 was merged there and other parts are fixed in Listviews", "updateAuthor": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2019-01-24T12:13:33.000+0000", "updated": "2019-01-24T12:13:33.000+0000" }, { "id": "445625", "author": { "name": "Andrea.Vitale", "key": "andrea.vitale", "displayName": "Andrea Vitale", "active": true, "timeZone": "Europe/Berlin" }, "body": "Already checked it. I'm currently using 7.5.1.v20190115054254 SDK.", "updateAuthor": { "name": "Andrea.Vitale", "key": "andrea.vitale", "displayName": "Andrea Vitale", "active": true, "timeZone": "Europe/Berlin" }, "created": "2019-01-24T14:22:53.000+0000", "updated": "2019-01-24T14:22:53.000+0000" }, { "id": "447162", "author": { "name": "ahutton", "key": "ahutton", "displayName": "Alan Hutton", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "ahutton", "key": "ahutton", "displayName": "Alan Hutton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-03-26T17:42:14.000+0000", "updated": "2019-03-26T17:42:14.000+0000" } ], "maxResults": 12, "total": 12, "startAt": 0 } } }