{ "id": "135862", "key": "TIMOB-17572", "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": "20060", "description": "", "name": "Release 7.0.2", "archived": false, "released": true, "releaseDate": "2018-02-09" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-01-23T19:24:34.000+0000", "created": "2014-08-28T21:28:38.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "merge-7.0.2", "regression", "supportTeam" ], "versions": [ { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" }, { "id": "14826", "description": "Release 5.1.0-remaining iOS9 features, Android M features", "name": "Release 5.1.0", "archived": false, "released": true, "releaseDate": "2015-11-20" }, { "id": "16925", "description": "WatchKit Support--all going into 5.0 now", "name": "Release 5.0.0", "archived": true, "released": true, "releaseDate": "2015-09-16" }, { "id": "17532", "name": "Release 5.1.1", "archived": false, "released": true, "releaseDate": "2015-11-24" } ], "issuelinks": [], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2020-12-05T21:47:40.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "A template in a ListView includes an ActivityIndicator. The first time the activity indicator appears, its spinner works fine but the second and subsequent time it appears, the spinner does not work. \r\n\r\nSteps to reproduce:\r\n\r\n(1) Create a new Alloy project and drop the three attached files into their usual folders and run the project on an iPhone or iOS Simulator. \r\n\r\n(2) Scroll to the bottom. The ActivityIndicator appears as normal for a second, until it's replaced with more ListItems.\r\n\r\n(3) Scroll to the bottom again. Now the ActivityIndicator is sans-spinner. Every subsequent scroll will have the same results.\r\n\r\nIt appears that this is because the ActivityIndicator view is not properly resetting when removed from the ListView. When I set visible=false to the ActivityIndicator before removing it from the view, the spinner works ok. Unfortunately this requires editing a ListView which is an expensive operation. You can see the workaround in action by uncommenting line 95 of the example code.\r\n\r\nNote that the word \"Loading\" (also part of the ActivityIndicator) does appear even though the spinner does not.", "attachment": [ { "id": "50842", "filename": "index.js", "author": { "name": "twilkinson", "key": "twilkinson", "displayName": "Thomas Wilkinson", "active": true, "timeZone": "America/Chicago" }, "created": "2014-08-28T21:28:38.000+0000", "size": 2406, "mimeType": "application/x-javascript" }, { "id": "50843", "filename": "index.tss", "author": { "name": "twilkinson", "key": "twilkinson", "displayName": "Thomas Wilkinson", "active": true, "timeZone": "America/Chicago" }, "created": "2014-08-28T21:28:38.000+0000", "size": 870, "mimeType": "application/octet-stream" }, { "id": "50841", "filename": "index.xml", "author": { "name": "twilkinson", "key": "twilkinson", "displayName": "Thomas Wilkinson", "active": true, "timeZone": "America/Chicago" }, "created": "2014-08-28T21:28:38.000+0000", "size": 733, "mimeType": "text/xml" } ], "flagged": false, "summary": "iOS: ActivityIndicator does not reset when used in ListView", "creator": { "name": "twilkinson", "key": "twilkinson", "displayName": "Thomas Wilkinson", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "twilkinson", "key": "twilkinson", "displayName": "Thomas Wilkinson", "active": true, "timeZone": "America/Chicago" }, "environment": "SDK 5.1.1.GA, Xcode 7.1, CLI 5.1.0.", "comment": { "comments": [ { "id": "337765", "author": { "name": "chamnab", "key": "chamnab", "displayName": "Choung Chamnab", "active": true, "timeZone": "America/Los_Angeles" }, "body": "a small bug ..but no one fix..", "updateAuthor": { "name": "chamnab", "key": "chamnab", "displayName": "Choung Chamnab", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-01-04T08:49:13.000+0000", "updated": "2015-01-04T08:49:13.000+0000" }, { "id": "345176", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pull pending\r\nmaster - https://github.com/appcelerator/titanium_mobile/pull/6691", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-03-05T18:48:58.000+0000", "updated": "2015-03-05T18:48:58.000+0000" }, { "id": "348382", "author": { "name": "animecyc", "key": "animecyc", "displayName": "Seth Benjamin", "active": true, "timeZone": "America/New_York" }, "body": "Is there any reason why this is slated for a 4.1.0 release? Couldn't it be included with the 3.5.2 updates coming up? For now I will cherrypick the change myself, but i'd rather not in the near future.", "updateAuthor": { "name": "animecyc", "key": "animecyc", "displayName": "Seth Benjamin", "active": true, "timeZone": "America/New_York" }, "created": "2015-04-03T01:00:12.000+0000", "updated": "2015-04-03T01:00:12.000+0000" }, { "id": "354705", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix.\r\nThe activity indicator now resets as expected. Tested using the attached app files.\r\n\r\nClosing.\r\n\r\nEnvironment:\r\nAppc Studio : 4.1.0.201505071004\r\nTi SDK : 4.1.0.v20150605164428\r\nTi CLI : 4.0.1\r\nAlloy : 1.6.0\r\nMAC Yosemite : 10.10.3\r\nAppc npm : 4.0.0\r\nAppc CLI : 4.0.2-rc2\r\nNode: v0.10.37\r\nIOS simulator: Iphone 5 IOS 8.3", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-06-09T22:41:19.000+0000", "updated": "2015-06-10T00:09:34.000+0000" }, { "id": "356462", "author": { "name": "animecyc", "key": "animecyc", "displayName": "Seth Benjamin", "active": true, "timeZone": "America/New_York" }, "body": "This doesn't work correctly. While the indicator is properly visible the animation is stopped. I tested this in 4.0.0.GA (cherry picked the change) and the latest 4.0.1.", "updateAuthor": { "name": "animecyc", "key": "animecyc", "displayName": "Seth Benjamin", "active": true, "timeZone": "America/New_York" }, "created": "2015-06-30T22:38:55.000+0000", "updated": "2015-06-30T22:38:55.000+0000" }, { "id": "356463", "author": { "name": "animecyc", "key": "animecyc", "displayName": "Seth Benjamin", "active": true, "timeZone": "America/New_York" }, "body": "I also confirmed that this is not working in the latest 4.1.0 beta.", "updateAuthor": { "name": "animecyc", "key": "animecyc", "displayName": "Seth Benjamin", "active": true, "timeZone": "America/New_York" }, "created": "2015-06-30T22:49:49.000+0000", "updated": "2015-06-30T22:49:49.000+0000" }, { "id": "360789", "author": { "name": "jamesk.au", "key": "jamesk.au", "displayName": "James K", "active": true, "timeZone": "Australia/Sydney" }, "body": "I have spent more time than I care to admit trying to resolve this problem.\r\n\r\nIt is not limited to scrolling. If you use {{setSections}} to setup a list view containing one list section with one list item that uses an activity indicator, calling {{setSections}} again with exactly the same list section causes the activity indicator to stop animating.\r\n\r\nThere may be a missing {{[indicatorView startAnimating];}} call somewhere in {{TiUIActivityIndicator.m}}, or perhaps there is a problem with the way cells are displayed or refreshed in {{TiUIListView.m}}, but I haven't been able to work it out.\r\n\r\nIn the meantime, here is a workaround to ensure that visible activity indicators continue animating: only make changes to the list view and list sections using methods that call {{dispatchUpdateAction}} instead of {{dispatchBlock}}. So, you can update the list view using {{appendSection}}, {{insertSectionAt}}, {{deleteSectionAt}} and {{replaceSectionAt}}, but do not use {{setSections}}. You can only update list sections using {{setItems}}, {{updateItemAt}} and the other list section methods if you specify an animation. Activity indicators will stop animating if you use those methods without specifying an animation.", "updateAuthor": { "name": "jamesk.au", "key": "jamesk.au", "displayName": "James K", "active": true, "timeZone": "Australia/Sydney" }, "created": "2015-08-23T03:38:15.000+0000", "updated": "2015-08-23T03:38:15.000+0000" }, { "id": "364982", "author": { "name": "ptquang86", "key": "ptquang86", "displayName": "Quang Pham", "active": true, "timeZone": "Asia/Jakarta" }, "body": "This is not working in SDK 5.0.0.GA, iOS 8.4\r\nMy ListView use ActivityIndicator with data binding\r\nAfter data updated, the ActivityIndicator stop animated", "updateAuthor": { "name": "ptquang86", "key": "ptquang86", "displayName": "Quang Pham", "active": true, "timeZone": "Asia/Jakarta" }, "created": "2015-09-25T07:56:46.000+0000", "updated": "2015-09-25T07:56:46.000+0000" }, { "id": "372253", "author": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Is there any update on this bug? It still seems to be broken.", "updateAuthor": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-12-07T04:11:27.000+0000", "updated": "2015-12-07T04:11:27.000+0000" }, { "id": "376629", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~sdarda], can you please provide a test case that runs in an single app.js so we can test and debug it through Xcode directly? ", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-02-11T16:25:54.000+0000", "updated": "2016-02-11T16:25:54.000+0000" }, { "id": "420178", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~ewieber] Can you try to reproduce this and report back please?", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-05-22T22:36:11.000+0000", "updated": "2017-05-22T22:36:11.000+0000" }, { "id": "420220", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "I am able to see what [~jamesk.au] and [~sdarda] have reported.\r\nWhen adding items to the listview, the activity indicator stops spinning, when in a list item.\r\nI can see the same behavior when using this below, Classic test case:\r\n{code}\r\nvar win = Ti.UI.createWindow({backgroundColor: 'white'});\r\n\r\nvar listTemplate = {\r\n childTemplates: [\r\n { \r\n type: 'Ti.UI.Label', \r\n bindId: 'info', \r\n properties: { \r\n color: 'black',\r\n font: { fontFamily:'Arial', fontSize: '20dp', fontWeight:'bold' },\r\n left: '60dp', top: 0,\r\n }\r\n }\r\n ]\r\n};\r\nvar loadTemplate = {\r\n\tchildTemplates: [\r\n\t\t{\r\n\t \ttype: 'Ti.UI.ActivityIndicator', \r\n\t bindId: 'ai',\r\n\t properties: {\r\n\t\t\t\tleft:12,\r\n\t\t\t\tfont:{\r\n\t\t\t\t\tfontSize:16,\r\n\t\t\t\t\tfontFamily:'Helvetica',\r\n\t\t\t\t\tfontWeight:'bold',\r\n\t\t\t\t},\r\n\t\t\t\tcolor: \"black\",\r\n\t\t\t\tstyle: Ti.UI.ActivityIndicatorStyle.DARK,\r\n\t\t\t\theight: 55,\r\n\t\t\t\tvisible: true\r\n\t\t\t}\r\n\t\t}\r\n\t]\r\n};\r\n\r\nvar list = Ti.UI.createListView({\r\n templates: { 'item': listTemplate, 'load': loadTemplate },\r\n});\r\nvar sections = [];\r\n\r\nvar fruitSection = Ti.UI.createListSection({ headerTitle: 'Fruits / Frutas'});\r\nvar fruitDataSet = [\r\n { template: 'item', info: {text: 'Apple'}},\r\n { template: 'item', info: {text: 'Banana'}}\r\n];\r\nfruitSection.setItems(fruitDataSet);\r\nsections.push(fruitSection);\r\n\r\nlist.setSections(sections);\r\n\r\nvar iterations = 1;\r\n\r\nvar createListDataItems = function() {\r\n\tvar items = fruitDataSet;\r\n\tfruitDataSet.pop();\r\n\tfor (var i = 1; i <= 2; i++) {\r\n\t\titems.push({\r\n\t\t\ttemplate: 'item',\r\n\t\t\tinfo: {text: 'added '+ iterations + i }\r\n\t\t});\r\n\t}\r\n\titerations++;\r\n\t\r\n\treturn items;\r\n};\r\n\r\nvar createLoadingTransactionsListItem = function() {\r\n\tvar items = fruitDataSet;\r\n\titems.push({\r\n\t\ttemplate: 'load',\r\n\t\tai: {message: ' Loading...'}\r\n\t});\r\n\r\n\treturn items;\r\n};\r\n \r\nvar loadMore = function() {\r\n\t// show loading message\r\n\tfruitSection.setItems(createLoadingTransactionsListItem());\r\n\t\r\n\tsetTimeout(function() {\r\n\t\t// append more items \r\n\t\tfruitSection.setItems(createListDataItems());\r\n\r\n\t\tlist.setMarker({sectionIndex: 0, itemIndex: fruitSection.items.length-2});\r\n\t\t\r\n\t}, 2000);\r\n};\r\nlist.addEventListener('marker', loadMore);\r\n \r\nsetTimeout(loadMore, 0);\r\n \r\nwin.add(list);\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-05-23T16:00:09.000+0000", "updated": "2017-05-23T16:00:09.000+0000" }, { "id": "432975", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Actually this is a native -issue- behavior, whereby the native {{UITableView}} stops all animations once it moves out of the view-port. [This discussion|https://stackoverflow.com/a/36793776/5537752] described the issue pretty detailed. \r\n\r\nWe *may* be able to hook into our {{UITableViewCell}} subclass that is used for the (abstract) {{Ti.UI.ListItem}}, but we need to try that out.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-01-10T14:50:26.000+0000", "updated": "2018-01-10T14:50:40.000+0000" }, { "id": "432977", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/9716\r\nPR (7_0_X): https://github.com/appcelerator/titanium_mobile/pull/9717", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-01-10T15:13:02.000+0000", "updated": "2018-01-10T15:13:02.000+0000" }, { "id": "433109", "author": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR passed.", "updateAuthor": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-01-12T23:43:58.000+0000", "updated": "2018-01-12T23:43:58.000+0000" }, { "id": "433164", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR for Master passed and merged waiting for 7.0.2\r\nTest and other information can be found at https://github.com/appcelerator/titanium_mobile/pull/9716 (master)", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-01-16T00:10:33.000+0000", "updated": "2018-01-16T00:10:33.000+0000" }, { "id": "433629", "author": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified fix is found in:\r\nSDK 7.0.2.v20180124113923\r\nSDK 7.1.0.v20180124115505", "updateAuthor": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-01-24T23:20:51.000+0000", "updated": "2018-01-24T23:20:51.000+0000" }, { "id": "457814", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Unfortunately this is not fully fixed so far. See this test case:\r\n{code:js}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor: '#fff'\r\n});\r\n\r\nvar myTemplate = {\r\n\tchildTemplates: [\r\n\t\t{\r\n\t\t\ttype: 'Ti.UI.ActivityIndicator',\r\n\t\t\tbindId: 'loader',\r\n\t\t\tproperties: {\r\n\t\t\t\tindicatorColor: 'red',\r\n\t\t\t\tvisible: true\r\n\t\t\t}\r\n\t\t}\r\n\t]\r\n};\r\n\r\nvar list = Ti.UI.createListView({\r\n\ttemplates: { template: myTemplate },\r\n\tdefaultItemTemplate: 'template',\r\n\tsections: [\r\n\t\tTi.UI.createListSection({\r\n\t\t\titems: [ { properties: { height: 50 }, loader: { visible: true } } ]\r\n\t\t})\r\n\t]\r\n});\r\n\r\nwin.add(list);\r\nwin.open();\r\n\r\nsetTimeout(() => {\r\n\tlist.sections[0].items = [ { properties: { height: 50 }, loader: { indicatorColor: 'blue', visible: true } } ];\r\n}, 1000);\r\n{code}", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2020-12-05T21:47:40.000+0000", "updated": "2020-12-05T21:47:40.000+0000" } ], "maxResults": 23, "total": 23, "startAt": 0 } } }