{ "id": "114334", "key": "TIMOB-13868", "fields": { "issuetype": { "id": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true }, "parent": { "id": "120880", "key": "TIMOB-15408", "fields": { "summary": "Android: TableView/ListView behaves incorrectly when ScrollableView inside TableView/ListView", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "Low", "id": "4" }, "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": "15707", "description": "2013 Sprint 23", "name": "2013 Sprint 23", "archived": true, "released": true, "releaseDate": "2013-11-15" }, { "id": "15708", "description": "2013 Sprint 23 API", "name": "2013 Sprint 23 API", "archived": true, "released": true, "releaseDate": "2013-11-15" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-11-07T22:29:56.000+0000", "created": "2013-05-14T08:13:40.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [ { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "issuelinks": [ { "id": "32447", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "120880", "key": "TIMOB-15408", "fields": { "summary": "Android: TableView/ListView behaves incorrectly when ScrollableView inside TableView/ListView", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "Low", "id": "4" }, "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": "2017-03-22T00:16:26.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": "*Problem*\r\nThe pages of a ScrollableView are not drawn correctly when placed within a ListView.\r\n\r\n*Steps to reproduce*\r\n1. Launch the app with the code below.\r\n2. Scroll to the third page on the ScrollableView.\r\n3. Problem: The third page is not displayed (no green background is shown). (The first two pages are displayed correctly).\r\n4. Scroll back to the first page. Problem: This page is now also not displayed anymore.\r\n5. Scroll down the list, so that the ScrollableView leaves the screen.\r\n6. Scroll up again. The first page of the ScrollableView is now displayed correctly again.\r\n\r\nNote: Scrolling the ScrollableView within the ListView works much better when the fix of issue TIMOB-13610 is used.\r\n\r\n*Test Case*\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow();\r\n\r\nvar scrollableViewTemplate = {\r\n\tchildTemplates: [\r\n {\r\n \t type: 'Ti.UI.ScrollableView',\r\n \t bindId: 'scrollableView',\r\n \t properties: {\r\n \t\t height: '200dp',\r\n \t\t views: [\r\n \t\t\t Ti.UI.createView({ backgroundColor: 'red'}),\r\n \t\t\t Ti.UI.createView({ backgroundColor: 'blue'}),\r\n \t\t\t Ti.UI.createView({ backgroundColor: 'green'})\r\n \t\t ]\r\n \t }\r\n }\r\n\t]\r\n};\r\n\r\nvar items = [\r\n\t{ template: 'scrollableView'}\r\n];\r\n\r\nfor ( var i = 0; i < 20; i++) {\r\n\titems.push({ properties: { title: 'Item', height: '50dp'}});\r\n}\r\n\r\nvar section = Ti.UI.createListSection({\r\n\titems: items\r\n});\r\n\r\nvar listView = Ti.UI.createListView({\r\n\ttemplates: {\r\n\t\t'scrollableView': scrollableViewTemplate\r\n\t},\r\n\tsections: [ section ]\r\n});\r\n\r\nwin.add(listView);\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: ScrollableView pages within ListView not displayed correctly", "creator": { "name": "philet", "key": "philet", "displayName": "Philippe Wueger", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "philet", "key": "philet", "displayName": "Philippe Wueger", "active": true, "timeZone": "Europe/Berlin" }, "environment": "Titanium 3.2.0 Master\r\nAndroid 4.0\r\nNexus S", "comment": { "comments": [ { "id": "251863", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Philippe,\r\n\r\nPlease take a look at TIMOB-13610, I believe it's the same issue. Would be even better if you could try out the pull request if you know how to build Titanium.\r\n\r\nThanks.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-14T18:33:22.000+0000", "updated": "2013-05-14T18:33:22.000+0000" }, { "id": "252016", "author": { "name": "philet", "key": "philet", "displayName": "Philippe Wueger", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hi Daniel\n\nThanks for looking into this.\n\nThis issue is not the same as the one described in TIMOB-13610. TIMOB-13610 is regarding the scrolling behavior of a ScrollableView within a ListView/TableView/ScrollView (how the scrolling is affected by the user touching the screen). This issue here is about the problem that, after scrolling to a new page, the view within the scrolled in page does not appear at all.\n\nAlso, the issue here only occurs in a ListView, but does not occur in a TableView.\n\nWith regards to the pull request from TIMOB-13610: I have tested it with TableViews and ListViews and it works very good.\n\nRegards,\nPhilippe\n", "updateAuthor": { "name": "philet", "key": "philet", "displayName": "Philippe Wueger", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-05-15T12:06:04.000+0000", "updated": "2013-05-15T12:06:04.000+0000" }, { "id": "253094", "author": { "name": "philet", "key": "philet", "displayName": "Philippe Wueger", "active": true, "timeZone": "Europe/Berlin" }, "body": "The problem seems to be caused by the ListViewWrapper onLayout Method in TiListView.java.\r\n\r\nIf I change this:\r\n{code}\r\nif (changed) {\r\n\tfocusedView.setOnFocusChangeListener(focusListener);\r\n\tfocusListener.onFocusChange(focusedView, false);\r\n} else {\r\n\t//Ok right now focus is with listView. So set it back to the focusedView\r\n\tfocusedView.requestFocus();\r\n\tfocusedView.setOnFocusChangeListener(focusListener);\r\n}\r\n{code}\r\n\r\nto this:\r\n{code}\r\nfocusedView.setOnFocusChangeListener(focusListener);\r\nfocusListener.onFocusChange(focusedView, false);\r\n{code}\r\n\r\nthe issue goes away.\r\n\r\nHowever, at the moment I do not know what the side effects are from this change. So this still needs to be checked.", "updateAuthor": { "name": "philet", "key": "philet", "displayName": "Philippe Wueger", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-05-21T15:40:56.000+0000", "updated": "2013-05-21T15:40:56.000+0000" }, { "id": "278712", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master PR: https://github.com/appcelerator/titanium_mobile/pull/4928", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-11-07T21:44:25.000+0000", "updated": "2013-11-07T21:44:25.000+0000" }, { "id": "414702", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as fixed.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-22T00:16:26.000+0000", "updated": "2017-03-22T00:16:26.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }