{ "id": "85793", "key": "TIMOB-7495", "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": [], "resolution": null, "resolutiondate": null, "created": "2012-02-01T04:33:09.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [ { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" }, { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" } ], "issuelinks": [], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2018-08-02T17:31:54.000+0000", "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" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "Disable animation when you manually define scrollableView.currentPage.\r\nh4. Repo Steps\r\n1.Run the below code in the app.js\r\n2.Scroll through scrollable views.\r\n3.When scroll from right to left, next screen animates from left to right.\r\n4.When scroll from left to right, previous screen animates from right to left.\r\n\r\nPlease find the code here.\r\n{code}\r\nvar counter = 0;\r\nvar colors = ['#ffffff', '#ff0000', '#6699cc', '#aaaaaa', '#cccccc', '#00ff00'];\r\n\r\n// create a view with random color\r\nfunction createView() {\r\n\tvar nextColor = colors[counter++];\r\n\t\r\n\tvar view = Ti.UI.createView({\r\n\t\tbackgroundColor: nextColor\r\n\t});\r\n\t\r\n\tif(counter >= colors.length) {\r\n\t\tcounter = 0;\r\n\t}\r\n\t\r\n\treturn view;\r\n}\r\n\r\nvar win = Ti.UI.createWindow({\r\n\t\r\n});\r\n\r\n\r\nvar scrollView = Titanium.UI.createScrollableView({\r\n\tviews: [createView(), createView(), createView()],\r\n\tshowPagingControl:true,\r\n\tpagingControlHeight:30,\r\n\tmaxZoomScale:2.0, \r\n\tcurrentPage:1\r\n});\r\n\r\nscrollView.addEventListener('scroll', function(e) {\r\n\tif(e.currentPage == 2) {\r\n\t\tTi.API.info(\"Scrolling to right\");\r\n\t\t\r\n\t\tvar newView = createView();\r\n\r\n\t\tscrollView.views[0].backgroundColor = scrollView.views[1].backgroundColor;\r\n\t\tscrollView.views[1].backgroundColor = scrollView.views[2].backgroundColor;\r\n\t\tscrollView.views[2].backgroundColor = newView.backgroundColor;\r\n\t}\r\n\telse if(e.currentPage == 0) {\r\n\t\tTi.API.info(\"Scrolling to left\");\r\n\t\t\r\n\t\tvar newView = createView();\r\n\t\t\r\n\t\tscrollView.views[2].backgroundColor = scrollView.views[1].backgroundColor;\r\n\t\tscrollView.views[1].backgroundColor = scrollView.views[0].backgroundColor;\r\n\t\tscrollView.views[0].backgroundColor = newView.backgroundColor;\r\n\t}\r\n \r\n\tscrollView.currentPage = 1;\r\n});\r\n\r\nwin.add(scrollView);\r\n\r\nwin.open();\r\n{\\code}", "attachment": [], "flagged": false, "summary": "Android: disable animation when you manually define scrollableView.currentPage", "creator": { "name": "nsharma", "key": "nsharma", "displayName": "Nikhil Sharma", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "nsharma", "key": "nsharma", "displayName": "Nikhil Sharma", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "android 2.3.4\r\nSamsung galaxy SII", "comment": { "comments": [], "maxResults": 0, "total": 0, "startAt": 0 } } }