{ "id": "131044", "key": "TIMOB-17045", "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": "15972", "description": "Release 3.4.0", "name": "Release 3.4.0", "archived": false, "released": true, "releaseDate": "2014-09-28" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-06-05T20:05:54.000+0000", "created": "2014-05-29T22:24:12.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "module_listview", "qe-closed-3.4.0", "qe-manualtest", "qe-testadded", "supportTeam" ], "versions": [ { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "issuelinks": [ { "id": "37974", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "128045", "key": "TIMOB-16679", "fields": { "summary": "Android: Links do not work in ListView (e.g. autoLink)", "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": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-08-19T09:25:24.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "Due to listView architecture of view recycling, 'html' and 'text' don't work together in side a list view.\r\n\r\n{code}\r\nvar self = Ti.UI.createWindow({\r\n backgroundColor: 'white'\r\n});\r\nvar myTemplate = {\r\n childTemplates: [ // \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: 'black',\r\n font: { fontFamily:'Arial', fontSize: '20dp', fontWeight:'bold' },\r\n left: '60dp', top: 0,\r\n autoLink: Ti.UI.AUTOLINK_ALL\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: '60dp', top: '50dp',\r\n autoLink: Ti.UI.AUTOLINK_NONE\r\n }\r\n }\r\n ]\r\n};\r\n \r\nvar listView = Ti.UI.createListView({\r\n // Maps myTemplate dictionary to 'template' string\r\n templates: { 'template': myTemplate },\r\n // Use 'template', that is, the myTemplate dict created earlier\r\n // for all items as long as the template property is not defined for an item.\r\n defaultItemTemplate: 'template'\r\n});\r\nvar sections = [];\r\n \r\nvar fruitSection = Ti.UI.createListSection({ headerTitle: 'Fruits / Frutas'});\r\nvar fruitDataSet = [\r\n { info: {html: \"http://google.com\"}, es_info: {text: 'Manzana'}},\r\n { info: {text: \"Banana\\t http://en.wikipedia.org/wiki/Banana\"}, es_info: {text: 'Banana'}},\r\n { info: {text: \"Pineapple\\t http://en.wikipedia.org/wiki/Pineapple\"}, es_info: {text: 'Pina'}},\r\n { info: {text: \"Peach \\thttp://en.wikipedia.org/wiki/Peach\"}, es_info: {text: 'Durazno'}},\r\n { info: {text: \"Apple\\t http://en.wikipedia.org/wiki/Apple\"}, es_info: {text: 'Manzana'}},\r\n { info: {text: \"Banana\\t http://en.wikipedia.org/wiki/Banana\"}, es_info: {text: 'Banana'}},\r\n { info: {text: \"Pineapple\\t http://en.wikipedia.org/wiki/Pineapple\"}, es_info: {text: 'Pina'}},\r\n { info: {text: \"Peach \\thttp://en.wikipedia.org/wiki/Peach\"}, es_info: {text: 'Durazno'}}\r\n];\r\nfruitSection.setItems(fruitDataSet);\r\nsections.push(fruitSection);\r\n \r\nvar vegSection = Ti.UI.createListSection({ headerTitle: 'Vegetables / Verduras'});\r\nvar vegDataSet = [\r\n { info: {text: 'Carrot\\thttp://en.wikipedia.org/wiki/Carrot'}, es_info: {text: 'Zanahoria'}},\r\n { info: {text: 'Potato\\thttp://en.wikipedia.org/wiki/Potato'}, es_info: {text: 'Patata'}},\r\n { info: {text: 'Carrot\\thttp://en.wikipedia.org/wiki/Carrot'}, es_info: {text: 'Zanahoria'}},\r\n { info: {text: 'Potato\\thttp://en.wikipedia.org/wiki/Potato'}, es_info: {text: 'Patata'}},\r\n];\r\nvegSection.setItems(vegDataSet);\r\nsections.push(vegSection);\r\n \r\nvar grainSection = Ti.UI.createListSection({ headerTitle: 'Grains / Granos'});\r\nvar grainDataSet = [\r\n { info: {text: \"Corn\\t http://en.wikipedia.org/wiki/Maiz\"}, es_info: {text: 'Maiz'}},\r\n { info: {text: \"Rice\\t http://en.wikipedia.org/wiki/Rice\"}, es_info: {text: 'Arroz'}},\r\n { info: {text: \"Wheat\\t http://en.wikipedia.org/wiki/Wheat\"}, es_info: {text: 'Trigo'}},\r\n { info: {text: \"Corn\\t http://en.wikipedia.org/wiki/Maiz\"}, es_info: {text: 'Maiz'}},\r\n { info: {text: \"Rice\\t http://en.wikipedia.org/wiki/Rice\"}, es_info: {text: 'Arroz'}},\r\n { info: {text: \"Wheat\\t http://en.wikipedia.org/wiki/Wheat\"}, es_info: {text: 'Trigo'}}\r\n];\r\ngrainSection.setItems(grainDataSet);\r\nsections.push(grainSection);\r\n \r\nlistView.setSections(sections);\r\n \r\nself.add(listView);\r\nself.open();\r\n{code}\r\n\r\nSteps to reproduce:\r\n1. Run code above\r\n2. Notice missing rows (you may need to scroll back and forth, depending on device)\r\n\r\n", "attachment": [], "flagged": false, "summary": "Android: Label 'html' and 'text' properties don't work together in ListView", "creator": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 105, "state": "closed", "name": "2014 Sprint 11 SDK", "startDate": "2014-05-27T21:43:32.338Z", "endDate": "2014-06-07T00:00:00.000Z", "completeDate": "2014-06-09T21:36:37.587Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "306928", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master PR: https://github.com/appcelerator/titanium_mobile/pull/5743", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-05-29T22:31:20.000+0000", "updated": "2014-05-29T22:31:20.000+0000" }, { "id": "307717", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "PR merged", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-06-05T20:05:54.000+0000", "updated": "2014-06-05T20:05:54.000+0000" }, { "id": "319241", "author": { "name": "djha", "key": "djha", "displayName": "Dhirendra Jha", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified fix with the below environment:\r\n\r\nAppcelerator Studio: 3.4.0.201408180158\r\nSDK build: 3.4.0.v20140815142514\r\nacs: 1.0.16\r\nnpm: 1.3.2\r\nalloy: 1.5.0-dev\r\nCLI: titanium-3.4.0-dev\r\ntitanium-code-processor:1.1.1\r\nXcode: Xcode 6 beta 5\r\nOsx: Mavericks(10.9.3)\r\nDevice: Galaxy Nexus (4.1.1) and Nexus 7(4.4.2)\r\n\r\nLabel \"html\" and \"text\" property is working fine in ListView. Hence Closing the issue.", "updateAuthor": { "name": "djha", "key": "djha", "displayName": "Dhirendra Jha", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-08-19T07:13:01.000+0000", "updated": "2014-08-19T07:13:01.000+0000" } ], "maxResults": 13, "total": 13, "startAt": 0 } } }