{ "id": "115108", "key": "TIMOB-14018", "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": [], "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2013-05-29T20:53:47.000+0000", "created": "2013-05-29T11:14:20.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "regression" ], "versions": [ { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "issuelinks": [ { "id": "29144", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "106631", "key": "TIMOB-12114", "fields": { "summary": "Android: 'longpress' on tableView with headerView returns incorrect index and might lead to a crash", "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": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-21T22:56:35.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": "I've already added a comment on TIMOB-12114 but I do not have the permission to reopen it because it is already resolved.\r\n\r\nThe app is still crashing on 3.2.0.v20130522115134 build if you remove the headerTitle. Tried it on a Samsung Galaxy S2 with Android 4.1.2.\r\n\r\nLooks like it is crashing even if you haven't added a longpress event listener. That means once a user does a longpress on any row, the Android app crashes.\r\n\r\nLink to Q&A discussion: http://developer.appcelerator.com/question/152977/android-longpress-on-tableview-with-headerview-returns-incorrect-index-and-might-lead-to-a-crash\r\n\r\nCode to reproduce:\r\n\r\n{code:javascript}\r\nvar _self = Ti.UI.createWindow({\r\n\tbackgroundColor : '#fff',\r\n\theight : Ti.UI.FILL,\r\n\twidth : Ti.UI.FILL\r\n});\r\n_self.open();\r\n\r\nvar table = Ti.UI.createTableView({\r\n\t//headerTitle : \"title\" // Remove to fix\r\n});\r\n\r\nvar headerView = Ti.UI.createView({\r\n\tbackgroundColor : '#444',\r\n\tvisible : false,\r\n\theight : 0\r\n});\r\nvar titleLabel = Ti.UI.createLabel({\r\n\twidth : _self.width,\r\n\ttextAlign : 'center',\r\n\tcolor : '#eee',\r\n\ttext : \"Title text\"\r\n});\r\nheaderView.add(titleLabel);\r\ntable.setHeaderView(headerView);\r\n\r\nvar row = Ti.UI.createTableViewRow({\r\n\ttitle : 'Press me long'\r\n});\r\ntable.setData([row]);\r\n\r\n_self.add(table);\r\n\r\ntable.addEventListener('click', function(e) {\r\n\tTi.API.info(\"#### table - row \" + e.index + \" clicked\")\r\n});\r\ntable.addEventListener('longpress', function(e) {\r\n\tTi.API.info(\"#### table - row \" + e.index + \" longpressed\")\r\n});\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: 'longpress' on tableView with headerView but no headerTitle returns incorrect index and might lead to a crash", "creator": { "name": "jicks83", "key": "jicks83", "displayName": "Jick Steen", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "jicks83", "key": "jicks83", "displayName": "Jick Steen", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "comment": { "comments": [ { "id": "254610", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested and confirmed on Samsung Galaxy S2 Android 2.3.6 with latest 3.2 CI build.\n\nI will link the two issues.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-29T19:04:53.000+0000", "updated": "2013-05-29T19:04:53.000+0000" }, { "id": "254640", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Going to re-mark as a duplicate and reopened the old one.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-29T20:53:47.000+0000", "updated": "2013-05-29T20:53:47.000+0000" }, { "id": "414650", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as duplicate with reference to the above comments.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-21T22:56:35.000+0000", "updated": "2017-03-21T22:56:35.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }