{ "id": "171574", "key": "TIMOB-25991", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "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": "21052", "description": "", "name": "Release 9.3.0", "archived": false, "released": true, "releaseDate": "2020-12-14" } ], "resolution": null, "resolutiondate": null, "created": "2018-04-26T19:25:06.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "android", "listview", "refreshcontrol" ], "versions": [], "issuelinks": [ { "id": "58576", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "inwardIssue": { "id": "175374", "key": "TIMOB-28048", "fields": { "summary": "Android: RefreshControl in TableView only works when dragging content", "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": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-11-20T00:25:04.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": "*Problem:*\r\nWhen creating a ListView with a RefreshControl you can only drag the view down when you drag&drop the content. If you ListView is empty you don't have any handle to drag.\r\n\r\n*Code*\r\n\r\n{code:java}\r\nvar win = Ti.UI.createWindow({\r\n\tfullscreen: true\r\n});\r\nvar counter = 0;\r\n\r\nfunction genData() {\r\n\tvar data = [];\r\n\tvar i = 1;\r\n\tfor (i = 1; i <= 3; i++) {\r\n\t\tdata.push({\r\n\t\t\tproperties: {\r\n\t\t\t\ttitle: 'ROW ' + (counter + i)\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\tcounter += 3;\r\n\treturn data;\r\n}\r\nvar section = Ti.UI.createListSection();\r\nsection.setItems(genData());\r\nvar control = Ti.UI.createRefreshControl({\r\n\ttintColor: 'red'\r\n})\r\nvar listView = Ti.UI.createListView({\r\n\tsections: [section],\r\n\trefreshControl: control,\r\n\theight: Ti.UI.FILL,\r\n\twidth: Ti.UI.FILL\r\n});\r\ncontrol.addEventListener('refreshstart', function(e) {\r\n\tTi.API.info('refreshstart');\r\n\tsetTimeout(function() {\r\n\t\tTi.API.debug('Timeout');\r\n\t\tsection.appendItems(genData());\r\n\t\tcontrol.endRefreshing();\r\n\t}, 2000);\r\n})\r\nwin.add(listView);\r\nwin.open();\r\n\r\n{code}\r\n\r\nDragging below {{Row 3}} won't show the RefreshControl it will only work when you start dragging on the 3 items. \r\n\r\n*What to expect*\r\nThe whole ListView space (in the example Ti.UI.FILL) should work as a drag area. Otherwise you can't use it with an empty ListView\r\n\r\n*Testsetup*\r\n* Android 7.0.1 / HTC A9\r\n* SDK 7.1.0.GA\r\n\r\n", "attachment": [], "flagged": false, "summary": "Android: RefreshControl in ListView only works when dragging content", "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": "442156", "author": { "name": "chmiiller", "key": "chmiiller", "displayName": "Carlos Henrique Zinato", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I've had the same and ended up by adding a fake tall listItem to the listView when on Android =/", "updateAuthor": { "name": "chmiiller", "key": "chmiiller", "displayName": "Carlos Henrique Zinato", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-09-28T11:39:54.000+0000", "updated": "2018-09-28T11:39:54.000+0000" }, { "id": "447542", "author": { "name": "bgarcia", "key": "bgarcia", "displayName": "Brian García", "active": true, "timeZone": "America/Los_Angeles" }, "body": "anyone can take a look on this? iOS works well", "updateAuthor": { "name": "bgarcia", "key": "bgarcia", "displayName": "Brian García", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-04-09T13:38:29.000+0000", "updated": "2019-04-09T13:38:29.000+0000" }, { "id": "457337", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile/pull/12029", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-10-26T15:59:59.000+0000", "updated": "2020-10-26T15:59:59.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }