{ "id": "129134", "key": "TIMOB-16879", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": "17706", "name": "Release 5.4.0", "archived": false, "released": true, "releaseDate": "2016-08-11" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-04-26T23:19:31.000+0000", "created": "2014-04-16T21:27:17.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "insert", "scrollableView" ], "versions": [ { "id": "15857", "description": "Release 3.2.2", "name": "Release 3.2.2", "archived": false, "released": true, "releaseDate": "2014-03-09" } ], "issuelinks": [ { "id": "57061", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "inwardIssue": { "id": "172750", "key": "TIMOB-26656", "fields": { "summary": "Ti.UI.View: Add \"insertViewsAt()\" method", "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": "High", "id": "2" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } }, { "id": "38379", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "131113", "key": "AC-3219", "fields": { "summary": "Implement insertView method for ScrollableView", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2018-12-14T13:12:23.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" }, { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "The ScrollableView currently supports the \".addView()\" method to programmatically append additional views to the end of the collection. However, it has no method to insert one or more views at the beginning (prepend), or somewhere in the middle of the collection.\r\n\r\nA [suggested workaround|http://developer.appcelerator.com/question/161891/scrollable-view---insert-a-view-into-a-specific-spot] for this limitation involves getting the views array with .getViews(), updating the array, then re-assiging the views array back to the control with .setViews(). While this works, it is not efficient and causes significant flickering on the UI with complex views, every time .setViews() is used.\r\n\r\nIt would be great to have a method like \".insertViewsAt(idx, views)\" so one item (or more) can be prepended or inserted at specific locations without requiring the entire views collection to be re-bound and rendered. \r\n\r\nThis would also bring the ScrollableView control in line with ListView and TableView, both of which feature \"insert\" methods.\r\n\r\nIn my particular case; I'm using a ScrollableView to page through over 500 views which are fairly complex. Loading all views into the ScrollableView is not an option as that takes too much memory and crashes the app. My solution is to have a sliding range that loads 9 views at a time (4 before and 4 after the current page) on the ScrollableView. And as the user moves left or right, it dynamically prepends or appends more views as needed, removing views also from the opposite end so only 9 views are loaded at any given time. Appending with addView() works well (no need for setViews(), so no flickering), but prepending with the getViews()/update/setViews() process does not work well in these situations.\r\n", "attachment": [], "flagged": false, "summary": "ScrollableView: Add \"insertViewsAt()\" method", "creator": { "name": "bcproductions", "key": "bcproductions", "displayName": "Ed", "active": true, "timeZone": "America/Havana" }, "subtasks": [], "reporter": { "name": "bcproductions", "key": "bcproductions", "displayName": "Ed", "active": true, "timeZone": "America/Havana" }, "environment": "Ti SDK 3.2.2GA", "closedSprints": [ { "id": 624, "state": "closed", "name": "2016 Sprint 09 SDK", "startDate": "2016-04-23T00:39:45.452Z", "endDate": "2016-05-07T00:39:00.000Z", "completeDate": "2016-05-09T03:43:10.279Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "302127", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thanks for the nice writeup. I am curious if you have played around with cacheSize property of ScrollableView for your use case.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-04-23T04:45:44.000+0000", "updated": "2014-04-23T04:45:44.000+0000" }, { "id": "302242", "author": { "name": "bcproductions", "key": "bcproductions", "displayName": "Ed", "active": true, "timeZone": "America/Havana" }, "updateAuthor": { "name": "bcproductions", "key": "bcproductions", "displayName": "Ed", "active": true, "timeZone": "America/Havana" }, "created": "2014-04-23T18:40:21.000+0000", "updated": "2014-06-24T19:52:51.000+0000" }, { "id": "302336", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Moving this feature request to engineering for further evaluation and prioritization.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-04-24T05:55:11.000+0000", "updated": "2014-04-24T05:55:11.000+0000" }, { "id": "304545", "author": { "name": "wood1k", "key": "wood1k", "displayName": "Alexey Chulochnikov", "active": true, "timeZone": "Europe/Helsinki" }, "body": "+1 for that feature", "updateAuthor": { "name": "wood1k", "key": "wood1k", "displayName": "Alexey Chulochnikov", "active": true, "timeZone": "Europe/Helsinki" }, "created": "2014-05-13T08:24:34.000+0000", "updated": "2014-05-13T08:24:34.000+0000" }, { "id": "308944", "author": { "name": "vkorol", "key": "vkorol", "displayName": "Viktor Korol", "active": true, "timeZone": "Europe/Istanbul" }, "body": "Please implement this feature.", "updateAuthor": { "name": "vkorol", "key": "vkorol", "displayName": "Viktor Korol", "active": true, "timeZone": "Europe/Istanbul" }, "created": "2014-06-13T19:27:40.000+0000", "updated": "2014-06-13T19:27:40.000+0000" }, { "id": "309824", "author": { "name": "Nastya", "key": "nastya", "displayName": "Nastya Lytvyn", "active": true, "timeZone": "America/Los_Angeles" }, "body": "+1 !!!", "updateAuthor": { "name": "Nastya", "key": "nastya", "displayName": "Nastya Lytvyn", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-19T12:22:31.000+0000", "updated": "2014-06-19T12:22:31.000+0000" }, { "id": "358928", "author": { "name": "creative_jira_user", "key": "uzbbert", "displayName": "Creative", "active": false, "timeZone": "Europe/Amsterdam" }, "body": "+1, very much needed. There currently seems to be no way to have an endless scrolling scrollableview without flickerings.", "updateAuthor": { "name": "creative_jira_user", "key": "uzbbert", "displayName": "Creative", "active": false, "timeZone": "Europe/Amsterdam" }, "created": "2015-08-04T13:03:18.000+0000", "updated": "2015-08-04T13:03:18.000+0000" }, { "id": "371338", "author": { "name": "colorhat", "key": "colorhat", "displayName": "Tobias Høegh", "active": true, "timeZone": "Europe/Oslo" }, "body": "Hope to see this soon alive!", "updateAuthor": { "name": "colorhat", "key": "colorhat", "displayName": "Tobias Høegh", "active": true, "timeZone": "Europe/Oslo" }, "created": "2015-11-24T10:48:50.000+0000", "updated": "2015-11-24T10:48:50.000+0000" }, { "id": "372548", "author": { "name": "nunocostapt", "key": "nunocostapt", "displayName": "Nuno Costa", "active": true, "timeZone": "Europe/Lisbon" }, "updateAuthor": { "name": "nunocostapt", "key": "nunocostapt", "displayName": "Nuno Costa", "active": true, "timeZone": "Europe/Lisbon" }, "created": "2015-12-09T20:39:12.000+0000", "updated": "2015-12-09T20:45:06.000+0000" }, { "id": "376615", "author": { "name": "jeffatstepup", "key": "jeffatstepup", "displayName": "Jeff Antram", "active": true, "timeZone": "Europe/London" }, "body": "@nuno, that's a different use case - vertical/horizontal layout container views.\r\n\r\n+1 for adding this feature", "updateAuthor": { "name": "jeffatstepup", "key": "jeffatstepup", "displayName": "Jeff Antram", "active": true, "timeZone": "Europe/London" }, "created": "2016-02-11T12:07:22.000+0000", "updated": "2016-02-11T12:07:22.000+0000" }, { "id": "377023", "author": { "name": "nunocostapt", "key": "nunocostapt", "displayName": "Nuno Costa", "active": true, "timeZone": "Europe/Lisbon" }, "body": "Any news on insertViewsAt(index, views) in order to add a bulk views in one operation ? \r\n\r\nThanks Nuno", "updateAuthor": { "name": "nunocostapt", "key": "nunocostapt", "displayName": "Nuno Costa", "active": true, "timeZone": "Europe/Lisbon" }, "created": "2016-02-16T22:30:58.000+0000", "updated": "2016-02-16T22:31:17.000+0000" }, { "id": "377094", "author": { "name": "colorhat", "key": "colorhat", "displayName": "Tobias Høegh", "active": true, "timeZone": "Europe/Oslo" }, "body": "I know, not a cool solution. But if you just have to, then go for it. Maybe this could be made as an module. I just needed a addViewToStart (beginning) - so I manipulated the SDK (bad solution). But this could probably be used to be manipulated to make a function like insertViewAt() \r\n\r\n{code:objective-c}\r\n//Add this to TiUIScrollableViewProxy.m after addView \r\n-(void)addViewToStart:(id)args\r\n{\r\n\tENSURE_SINGLE_ARG(args,TiViewProxy);\r\n\r\n\t[self lockViewsForWriting];\r\n\t[self rememberProxy:args];\r\n\t[args setParent:self];\r\n\tif (viewProxies != nil)\r\n\t{\r\n\t\t[viewProxies insertObject:args atIndex:0];\r\n\t}\r\n\telse\r\n\t{\r\n\t\tviewProxies = [[NSMutableArray alloc] initWithObjects:args,nil];\r\n\t}\r\n\t[self unlockViews];\r\n\t[self makeViewPerformSelector:@selector(addViewToStart:) withObject:args createIfNeeded:NO waitUntilDone:NO];\r\n}\r\n\r\n//As well as this in TiUIScrollableView.m after addView\r\n-(void)addViewToStart:(id)viewproxy\r\n{\r\n\t[self refreshScrollView:[self bounds] readd:YES];\r\n\t[self setCurrentPage:NUMINT(1) animated:NUMBOOL(NO)];\r\n}\r\n\r\n//As well as this in include/TiUIScrollableView.h after addView\r\n-(void)addViewToStart:(id)viewproxy;\r\n\r\n//As well as this in Classes/TiUIScrollableView.h after addView\r\n-(void)addViewToStart:(id)viewproxy;\r\n\r\n{code}\r\n", "updateAuthor": { "name": "colorhat", "key": "colorhat", "displayName": "Tobias Høegh", "active": true, "timeZone": "Europe/Oslo" }, "created": "2016-02-17T09:53:13.000+0000", "updated": "2016-02-17T09:53:13.000+0000" }, { "id": "377099", "author": { "name": "nunocostapt", "key": "nunocostapt", "displayName": "Nuno Costa", "active": true, "timeZone": "Europe/Lisbon" }, "body": "@Tobias Høegh, Thanks, Im testing!", "updateAuthor": { "name": "nunocostapt", "key": "nunocostapt", "displayName": "Nuno Costa", "active": true, "timeZone": "Europe/Lisbon" }, "created": "2016-02-17T12:14:41.000+0000", "updated": "2016-02-17T12:14:41.000+0000" }, { "id": "377109", "author": { "name": "nunocostapt", "key": "nunocostapt", "displayName": "Nuno Costa", "active": true, "timeZone": "Europe/Lisbon" }, "body": "@Tobias Høegh, can you please tell me what was your use case for? \r\n And how you implemented in js side? Was inside a loop like we with \"addView \" for infiniteve scroll\r\n\r\n\r\nif I scroll to a point that I want insert views (pages ) at the top (index 0) I just call like this: (like infinitive scroll both directions)\r\n\r\ngetPages(prev);\r\n\r\n{code:javascript}\r\nfunction getPages(prev) {\r\n var cardView = {};\r\n _.map(listArray, function(element) {\r\n cardView = Alloy.createController('cardView', {\r\n title : title,\r\n imageThumb : element.image,\r\n });\r\n\r\n if (prev === 'prev') {\r\n // add the views to the TOP of any views that may have already in scrollableview\r\n $.scrollAbleView.addViewToStart(cardView.getView());\r\n } else {\r\n // add the views to the end of list scrollableview\r\n $.scrollPages.addView(cardView.getView());\r\n }\r\n });\r\n}\r\n{code}\r\nNow, if I scroll to the END of my list usually insert views normally addView() method, in this case , I just call like this: (like infinitive scroll both directions)\r\n\r\n{code:javascript}\r\ngetPages();\r\n{code}\r\n\r\nThis make any sense to you?\r\nPS. sorry for the format, not sure why so many spaces and P tags!", "updateAuthor": { "name": "nunocostapt", "key": "nunocostapt", "displayName": "Nuno Costa", "active": true, "timeZone": "Europe/Lisbon" }, "created": "2016-02-17T14:47:41.000+0000", "updated": "2016-02-17T16:54:10.000+0000" }, { "id": "377118", "author": { "name": "jeffatstepup", "key": "jeffatstepup", "displayName": "Jeff Antram", "active": true, "timeZone": "Europe/London" }, "body": "Adding this gist for reference\r\n\r\n[https://gist.github.com/dawsontoth/810171]\r\n\r\nAlso, the setViews() method should not make the scrollableView flicker as it does at the moment.\r\n", "updateAuthor": { "name": "jeffatstepup", "key": "jeffatstepup", "displayName": "Jeff Antram", "active": true, "timeZone": "Europe/London" }, "created": "2016-02-17T17:08:07.000+0000", "updated": "2016-02-17T17:08:07.000+0000" }, { "id": "377123", "author": { "name": "nunocostapt", "key": "nunocostapt", "displayName": "Nuno Costa", "active": true, "timeZone": "Europe/Lisbon" }, "updateAuthor": { "name": "nunocostapt", "key": "nunocostapt", "displayName": "Nuno Costa", "active": true, "timeZone": "Europe/Lisbon" }, "created": "2016-02-17T17:51:57.000+0000", "updated": "2016-02-17T17:51:57.000+0000" }, { "id": "377127", "author": { "name": "jeffatstepup", "key": "jeffatstepup", "displayName": "Jeff Antram", "active": true, "timeZone": "Europe/London" }, "body": "@Nuno, nope, I don't see that issue at all. \r\n\r\nI am building an infinite scrollable view, with no \"insertAt\" method, I'm using setViews as in Dawson Toth's gist. \r\n\r\nThe setViews() call results in a noticeable flicker on update.", "updateAuthor": { "name": "jeffatstepup", "key": "jeffatstepup", "displayName": "Jeff Antram", "active": true, "timeZone": "Europe/London" }, "created": "2016-02-17T18:12:08.000+0000", "updated": "2016-02-18T14:22:27.000+0000" }, { "id": "377229", "author": { "name": "nunocostapt", "key": "nunocostapt", "displayName": "Nuno Costa", "active": true, "timeZone": "Europe/Lisbon" }, "body": "@Tobias Høegh, that seams not doing what I want :( \r\n\r\n\"insertAt \" aka \"preApend\" items.\r\n\r\n\"addView\" aka \"append item\" does now!", "updateAuthor": { "name": "nunocostapt", "key": "nunocostapt", "displayName": "Nuno Costa", "active": true, "timeZone": "Europe/Lisbon" }, "created": "2016-02-18T14:20:33.000+0000", "updated": "2016-02-18T14:24:47.000+0000" }, { "id": "377346", "author": { "name": "colorhat", "key": "colorhat", "displayName": "Tobias Høegh", "active": true, "timeZone": "Europe/Oslo" }, "body": "@nunocostapt I add 3 views on startup setting the currentPage to 1 (0,1,2) - is the user scrolling increasing, then I use addView when we get currentPage 2 or higher. On the opposite side, I call addViewToStart if the currentPage is 0. Check out my app and the due date picker or stats on top of profiles: https://itunes.apple.com/app/moogli/id1068103957 - or check out the tweet I made: http://bit.ly/1RbK6fZ\r\n\r\nBy the way, this infinite scrollable view is really not smooth and has a strange effect on scrolling slowly http://bit.ly/1QNrkJ5", "updateAuthor": { "name": "colorhat", "key": "colorhat", "displayName": "Tobias Høegh", "active": true, "timeZone": "Europe/Oslo" }, "created": "2016-02-19T09:10:02.000+0000", "updated": "2016-02-19T09:10:02.000+0000" }, { "id": "377359", "author": { "name": "jeffatstepup", "key": "jeffatstepup", "displayName": "Jeff Antram", "active": true, "timeZone": "Europe/London" }, "body": "That is the setViews call firing I think. \r\n\r\n@Tobias have you looked at Android at all?", "updateAuthor": { "name": "jeffatstepup", "key": "jeffatstepup", "displayName": "Jeff Antram", "active": true, "timeZone": "Europe/London" }, "created": "2016-02-19T10:02:21.000+0000", "updated": "2016-02-19T10:02:21.000+0000" }, { "id": "377374", "author": { "name": "nunocostapt", "key": "nunocostapt", "displayName": "Nuno Costa", "active": true, "timeZone": "Europe/Lisbon" }, "body": "@Tobias Høegh do you mind to share some piece of the code that please?", "updateAuthor": { "name": "nunocostapt", "key": "nunocostapt", "displayName": "Nuno Costa", "active": true, "timeZone": "Europe/Lisbon" }, "created": "2016-02-19T13:42:06.000+0000", "updated": "2016-02-19T13:42:06.000+0000" }, { "id": "377375", "author": { "name": "Yrkh8trnoy", "key": "yrkh8trnoy", "displayName": "Kiley Williams", "active": true, "timeZone": "America/Vancouver" }, "body": "Just wanted to chime in here and say that this is something I wanted to file a long time ago, so +1 to this issue being fixed! an insertAt() or prepend() would be such a tremendous help. :)", "updateAuthor": { "name": "Yrkh8trnoy", "key": "yrkh8trnoy", "displayName": "Kiley Williams", "active": true, "timeZone": "America/Vancouver" }, "created": "2016-02-19T15:33:52.000+0000", "updated": "2016-02-19T15:33:52.000+0000" }, { "id": "377523", "author": { "name": "chmiiller", "key": "chmiiller", "displayName": "Carlos Henrique Zinato", "active": true, "timeZone": "America/Los_Angeles" }, "body": "+1!", "updateAuthor": { "name": "chmiiller", "key": "chmiiller", "displayName": "Carlos Henrique Zinato", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-02-22T15:12:01.000+0000", "updated": "2016-02-22T15:12:01.000+0000" }, { "id": "377601", "author": { "name": "bduyng@gmail.com", "key": "bduyng@gmail.com", "displayName": "Duy Bao Nguyen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/7764", "updateAuthor": { "name": "bduyng@gmail.com", "key": "bduyng@gmail.com", "displayName": "Duy Bao Nguyen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-02-23T05:44:05.000+0000", "updated": "2016-02-23T05:44:24.000+0000" }, { "id": "379314", "author": { "name": "Zyre", "key": "zyre", "displayName": "Peter Friend", "active": true, "timeZone": "America/Los_Angeles" }, "body": "+1 This is also something I've always wanted", "updateAuthor": { "name": "Zyre", "key": "zyre", "displayName": "Peter Friend", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-03-09T09:31:02.000+0000", "updated": "2016-03-09T09:31:02.000+0000" }, { "id": "379416", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Thanks for the PR folks. We will look into this as soon as we can, because meanwhile, we are trying to make sure this UI component is working well on main thread and with auto layout. After this is stable (which is soon!), we will visit this PR.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-03-10T07:33:56.000+0000", "updated": "2016-03-10T07:33:56.000+0000" }, { "id": "382866", "author": { "name": "Yrkh8trnoy", "key": "yrkh8trnoy", "displayName": "Kiley Williams", "active": true, "timeZone": "America/Vancouver" }, "body": "@kiat, any updates/progress on this one?", "updateAuthor": { "name": "Yrkh8trnoy", "key": "yrkh8trnoy", "displayName": "Kiley Williams", "active": true, "timeZone": "America/Vancouver" }, "created": "2016-04-15T22:57:45.000+0000", "updated": "2016-04-15T22:57:45.000+0000" }, { "id": "383907", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "As discussed with [~bduyng@gmail.com], I did some minor refactoring on the initial PR to make it more generic. \r\n\r\nUpdated PR: https://github.com/appcelerator/titanium_mobile/pull/7966\r\n\r\nDemo:\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow();\r\n\r\nvar view1 = Ti.UI.createView({ backgroundColor:'red' });\r\nvar view2 = Ti.UI.createView({ backgroundColor:'green' });\r\nvar view3 = Ti.UI.createView({ backgroundColor:'blue' });\r\n\r\nvar scrollableView = Ti.UI.createScrollableView({\r\n views:[view1,view2,view3],\r\n showPagingControl:true\r\n});\r\n\r\nwin.add(scrollableView);\r\nwin.open();\r\n\r\n// insert a view at index 1\r\nsetTimeout(function(){\r\n scrollableView.insertViewsAt(1, Ti.UI.createView({ backgroundColor:'yellow' }));\r\n // NOW: red, -> yellow <-,green, blue\r\n\r\n}, 2000);\r\n\r\n// insert many views at index 1 (and 2, 3 since it's an array)\r\nsetTimeout(function(){\r\n scrollableView.insertViewsAt(1, [\r\n Ti.UI.createView({ backgroundColor:'purple' }),\r\n Ti.UI.createView({ backgroundColor:'cyan' }),\r\n Ti.UI.createView({ backgroundColor:'gray' })\r\n ]);\r\n // NOW: red, -> purple, cyan, gray <-, yellow, green, blue \r\n\r\n}, 10000);\r\n{code}", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-04-26T09:15:47.000+0000", "updated": "2016-04-26T09:15:47.000+0000" }, { "id": "390090", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the implementation.\r\nWorks as expected.\r\n\r\nClosing.\r\n\r\nEnvironment:\r\nAppc Studio : 4.7.0.201606220541\r\nTi SDK : 5.4.0.v20160705213725\r\nTi CLI : 5.0.9\r\nAlloy : 1.9.1\r\nMAC El Capitan : 10.11.5\r\nAppc NPM : 4.2.8-1\r\nAppc CLI : 5.4.0-28\r\nNode: 4.4.4\r\nNexus 6 - Android 6.0.1\r\n", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-07-07T23:16:55.000+0000", "updated": "2016-07-07T23:16:55.000+0000" }, { "id": "390629", "author": { "name": "caioiglesias88", "key": "caioiglesias88", "displayName": "Caio Iglesias", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "I just tried this, and there doesn't seem to be a way to get away from flickering when adding views to position 0. :(\r\n\r\nWhenever a view is added to a position before your current page you get thrown around, and when you try to get back with setCurrentPage() it will flicker anyways.\r\n", "updateAuthor": { "name": "caioiglesias88", "key": "caioiglesias88", "displayName": "Caio Iglesias", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2016-07-13T20:40:56.000+0000", "updated": "2016-07-13T20:40:56.000+0000" }, { "id": "390695", "author": { "name": "nunocostapt", "key": "nunocostapt", "displayName": "Nuno Costa", "active": true, "timeZone": "Europe/Lisbon" }, "body": "Caio Iglesias yeah, Im in the same situation, I added an array of 22 views to a position 0 to be at the very top, and when I try to get back with setCurrentPage() it will flicker anyways. ", "updateAuthor": { "name": "nunocostapt", "key": "nunocostapt", "displayName": "Nuno Costa", "active": true, "timeZone": "Europe/Lisbon" }, "created": "2016-07-14T13:12:18.000+0000", "updated": "2016-07-14T13:12:18.000+0000" }, { "id": "400046", "author": { "name": "nunocostapt", "key": "nunocostapt", "displayName": "Nuno Costa", "active": true, "timeZone": "Europe/Lisbon" }, "body": "Caio Iglesias and all, just and Update on this subject and related to y above comment:\r\nI added the prop. directly to .tss \r\n{code:java}\r\ncacheSize: 22\r\n{code}\r\n\r\nthe same number (22) of the views that I have and will load in next round and the flicker just gonne. :)\r\nIm still testing with sdk 5.5.1", "updateAuthor": { "name": "nunocostapt", "key": "nunocostapt", "displayName": "Nuno Costa", "active": true, "timeZone": "Europe/Lisbon" }, "created": "2016-10-28T17:50:29.000+0000", "updated": "2016-10-28T17:50:29.000+0000" }, { "id": "400059", "author": { "name": "Yrkh8trnoy", "key": "yrkh8trnoy", "displayName": "Kiley Williams", "active": true, "timeZone": "America/Vancouver" }, "body": "So if I understand this correctly, the cache size is what holds the views in place so that they don't move when new views are inserted?", "updateAuthor": { "name": "Yrkh8trnoy", "key": "yrkh8trnoy", "displayName": "Kiley Williams", "active": true, "timeZone": "America/Vancouver" }, "created": "2016-10-29T01:12:55.000+0000", "updated": "2016-10-29T01:12:55.000+0000" } ], "maxResults": 33, "total": 33, "startAt": 0 } } }