{ "id": "92220", "key": "TIMOB-9207", "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": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13404", "description": "Sprint 2012-12 Core", "name": "Sprint 2012-12 Core", "archived": true, "released": true, "releaseDate": "2012-06-17" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-07-11T05:21:28.000+0000", "created": "2012-05-23T12:06:04.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "core", "module_animation", "parity", "qe-testadded" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" } ], "issuelinks": [], "assignee": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2012-07-11T12:08:46.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": "h1. Problem\r\nWhen animating a view on Android through the transform property, the top left of the view is used, unlike on iOS where the center is used. Also, chained animations result in a jerky, unsmooth transition.\r\n\r\nh2. Reproduction\r\nOn iOS, this results in a blue box shrinking to 20% its size, then growing to 180%, then shrinking smoothly down to 20%, and so on, always centered. On Android, it shrinks to 20%, to the top left corner. Then it jumps to 100% size, and grows to 180%. Then it jumps to 100%, leaving the splash screen image visible through the white window, and shrinks to 20% the size.\r\n{code:title=app.js}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: '#fff'\r\n});\r\n\r\nvar box = Ti.UI.createView({\r\n backgroundColor: 'blue',\r\n width: 100, height: 100\r\n});\r\nwin.add(box);\r\n\r\nvar shrink = Ti.UI.createAnimation({\r\n transform: Ti.UI.create2DMatrix().scale(0.2, 0.2),\r\n duration: 1000\r\n});\r\nfunction doShrink() {\r\n box.animate(shrink);\r\n}\r\nshrink.addEventListener('complete', doGrow);\r\n\r\nvar grow = Ti.UI.createAnimation({\r\n transform: Ti.UI.create2DMatrix().scale(1.8, 1.8),\r\n duration: 1000\r\n});\r\nfunction doGrow() {\r\n box.animate(grow);\r\n}\r\ngrow.addEventListener('complete', doShrink);\r\n\r\nwin.addEventListener('open', doShrink);\r\n\r\nwin.open();\r\n{code}", "attachment": [ { "id": "28215", "filename": "timob9207big.zip", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-06-07T08:10:30.000+0000", "size": 3126947, "mimeType": "application/zip" } ], "flagged": false, "summary": "Android: Animation Center Parity and Jerkiness", "creator": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "environment": "Titanium SDK version: 2.1.0 (05/23/12 11:23 3e08ce1)\r\niPhone Simulator 5.1\r\nEPIC 4G running Android 2.3.7", "comment": { "comments": [ { "id": "197658", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "h3. Testing Notes\r\n\r\n* Test on 2.2, 2.3, 3.1 and 4.x.\r\n\r\n* Run the attached project timob9207big.zip.\r\n\r\n* Test the \"fail\" branch (master).\r\n\r\n* * When you run the \"timob-9207\" test, you should really see awful behavior in versions < Honeycomb. After a few animations, the background will show through and stick there. Even if you run on Honeycomb, it will be jerky (though at least the background won't suddenly become transparent.)\r\n\r\n* * When you run the \"timob-8958\" test, when you touch \"Menu\" it will rotate, but then pop back. (It's not supposed to pop back.)\r\n\r\n* * Run \"timob-7412\" test just to see how it looks. The goal is to make sure the fix branch, which you'll be testing later, doesn't regress timob-7412.\r\n\r\n* * When you run \"timob-9433\" test, you'll see very jerky clockwise rotation. It's supposed to be 7 clockwise movements in succession, then 1 that winds back counter-clockwise. Instead you'll see that the 7 clockwise movements keep starting over from the original position, rather than moving in succession.\r\n\r\n* Test the fix branch (Bill's timob-9207 branch).\r\n\r\n* * When you run the \"timob-9207\" branch, any background that shows through should not be sticky. Unfortunately there is still a \"flash\" on =Honeycomb.) This flash has proved very difficult to get out. The only big difference between a native app that I've created for testing it and our Titanium app is that we have our own custom views/layout (TiCompositeLayout). I'm afraid it's somehow guilty in this. Taking apart TiCompositeLayout (assuming I'm correct that it plays a role in this) to find out what it is about it that causes this to occur during animation is going to be a big task. I want to at least get these current fixes in to stop the horrible background-shows-through-and-sticks problem, and to fix the >=Honeycomb jerkiness that was present in master.\r\n\r\n* * When you run the \"timob-8958\" test, when you touch \"MEnu\" it will stick in place after its rotation. That's what it is supposed to do.\r\n\r\n* * When you run \"timob-7412\" you shouldn't see any real differences. (This is just a regression check.)\r\n\r\n* * When you run \"timob-9433\", you should see 7 clockwise and successive steps (20 degrees each) without going backwards, and then one unwind step going counter-clockwise.\r\n", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-06-07T08:31:22.000+0000", "updated": "2012-06-07T08:31:22.000+0000" }, { "id": "199913", "author": { "name": "tsmolich", "key": "tsmolich", "displayName": "Tamila Smolich", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as fixed. Verified with:\r\nTitanium Studio, build: 2.1.0.201206221045\r\nTitanium SDK: 2.1.0.v20120622174154\r\nDevice: Samsung Galaxy tab (3.2)", "updateAuthor": { "name": "tsmolich", "key": "tsmolich", "displayName": "Tamila Smolich", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-23T13:18:33.000+0000", "updated": "2012-06-23T13:18:33.000+0000" }, { "id": "202629", "author": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Re-opening to edit label", "updateAuthor": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-11T05:21:02.000+0000", "updated": "2012-07-11T05:21:02.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }