{ "id": "176006", "key": "AC-6670", "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": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2021-02-01T16:34:52.000+0000", "created": "2021-01-29T18:05:57.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2021-02-01T16:34:52.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": "If the first element of a ListView is not a section but a headerView it will crash when you start scrolling (SDK 9.3.1.GA)\r\n\r\n*Error (shortened):*\r\n{code}\r\n[ERROR] InputEventReceiver: Exception dispatching input event.\r\n[ERROR] TiExceptionHandler: (main) [19207,19325] ti.modules.titanium.ui.widget.listview.ListViewProxy cannot be cast to ti.modules.titanium.ui.widget.listview.ListSectionProxy\r\n[ERROR] TiExceptionHandler:\r\n[ERROR] TiExceptionHandler: ti.modules.titanium.ui.widget.listview.TiListView.generateScrollPayload(TiListView.java:263)\r\n[ERROR] TiExceptionHandler: ti.modules.titanium.ui.widget.listview.TiListView$1.onScrolled(TiListView.java:98)\r\n[ERROR] TiExceptionHandler: androidx.recyclerview.widget.RecyclerView.dispatchOnScrolled(RecyclerView.java:5173)\r\n[ERROR] TiExceptionHandler: androidx.recyclerview.widget.RecyclerView.scrollByInternal(RecyclerView.java:1971)\r\n[ERROR] TiExceptionHandler: androidx.recyclerview.widget.RecyclerView.onTouchEvent(RecyclerView.java:3391)\r\n{code}\r\n\r\n*Example*\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({ backgroundColor: 'white' });\r\nvar headerView = Ti.UI.createView({ height: Ti.UI.SIZE, width: Ti.UI.FILL, backgroundColor:\"#444\"});\r\nvar headerLabel = Ti.UI.createLabel({ height:Ti.UI.SIZE, width: Ti.UI.FILL, left: '15dp', right: '15dp', top: '15dp', color: 'black', text: 'Demo text'});\r\nheaderView.add(headerLabel);\r\nvar listView = Ti.UI.createListView({height: Ti.UI.FILL,top: 0,headerView: headerView});\r\nvar sections = [];\r\nvar fruitDataSet = [\r\n { properties: { title: 'Apple', color: 'black' } },\r\n { properties: { title: 'Banana', color: 'black' } },\r\n];\r\nvar fruitSection = Ti.UI.createListSection({ headerTitle: 'Fruits', items: fruitDataSet });\r\nsections.push(fruitSection);\r\nvar vegDataSet = [\r\n { properties: { title: 'Carrots', color: 'black' } },\r\n { properties: { title: 'Potatoes', color: 'black' } },\r\n];\r\nvar vegSection = Ti.UI.createListSection({ headerTitle: 'Vegetables', items: vegDataSet });\r\nsections.push(vegSection);\r\nvar fishDataSet = [\r\n { properties: { title: 'Cod', color: 'black' } },\r\n { properties: { title: 'Haddock', color: 'black' } },\r\n { properties: { title: 'Haddock', color: 'black' } },\r\n { properties: { title: 'Haddock', color: 'black' } },\r\n { properties: { title: 'Haddock', color: 'black' } },\r\n { properties: { title: 'Haddock', color: 'black' } },\r\n { properties: { title: 'Haddock', color: 'black' } },\r\n { properties: { title: 'Haddock', color: 'black' } },\r\n { properties: { title: 'Haddock', color: 'black' } },\r\n { properties: { title: 'Haddock', color: 'black' } },\r\n { properties: { title: 'Haddock', color: 'black' } },\r\n { properties: { title: 'Haddock', color: 'black' } },\r\n { properties: { title: 'Haddock', color: 'black' } },\r\n { properties: { title: 'Haddock', color: 'black' } },\r\n { properties: { title: 'Haddock', color: 'black' } },\r\n { properties: { title: 'Haddock', color: 'black' } },\r\n { properties: { title: 'Haddock', color: 'black' } },\r\n { properties: { title: 'Haddock', color: 'black' } },\r\n { properties: { title: 'Haddock', color: 'black' } },\r\n { properties: { title: 'Haddock', color: 'black' } },\r\n { properties: { title: 'Haddock', color: 'black' } },\r\n { properties: { title: 'Haddock', color: 'black' } },\r\n { properties: { title: 'Haddock', color: 'black' } },\r\n { properties: { title: 'Haddock', color: 'black' } },\r\n { properties: { title: 'Haddock', color: 'black' } },\r\n { properties: { title: 'Haddock', color: 'black' } },\r\n { properties: { title: 'Haddock', color: 'black' } },\r\n { properties: { title: 'Haddock', color: 'black' } },\r\n { properties: { title: 'Haddock', color: 'black' } },\r\n { properties: { title: 'Haddock', color: 'black' } },\r\n { properties: { title: 'Haddock', color: 'black' } },\r\n];\r\nvar fishSection = Ti.UI.createListSection({ headerTitle: 'Fish', items: fishDataSet });\r\nsections.push(fishSection);\r\nlistView.sections = sections;\r\nlistView.addEventListener(\"scrollend\",function(e){console.log(e.firstVisibleItemIndex)});\r\nwin.add(listView);\r\nwin.open();\r\n{code}\r\n\r\n*Setup:*\r\nPixel 4, Android 11\r\nTitanium SDK 9.3.1.GA", "attachment": [], "flagged": false, "summary": "Android: Crash when scolling a ListView with a headerView", "creator": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "comment": { "comments": [ { "id": "458115", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/12423", "updateAuthor": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2021-01-29T18:06:16.000+0000", "updated": "2021-01-29T18:06:16.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }