{ "id": "103182", "key": "TIMOB-11403", "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": "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-07-20T18:24:40.000+0000", "created": "2012-10-12T00:20:56.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "core", "insight", "qe-and100112" ], "versions": [ { "id": "14137", "description": "Release 2.1.3", "name": "Release 2.1.3", "archived": true, "released": true, "releaseDate": "2012-10-03" }, { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "issuelinks": [], "assignee": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-10-23T20:36:45.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": "Steps to Reproduce:\r\n1. Make a new Alloy project\r\n2. Use the Alloy bouncy logo widget (https://github.com/appcelerator/alloy/tree/master/test/apps/widgets/widget_bouncylogo)\r\n3. Run it on Android.\r\n\r\nActual:\r\nCrashes sometime, other time it is very slow and the logo disappears\r\n\r\nExpected:\r\nShould work smoothly", "attachment": [ { "id": "32547", "filename": "Bouncy.txt", "author": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-12T00:20:56.000+0000", "size": 5231, "mimeType": "text/plain" } ], "flagged": false, "summary": "Android: Animation: bouncy animation from alloy is very slow and throwing errors", "creator": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "SDK: 3.0.0.v20121011163112\r\nAndroid Emulator: 3.2 and 4.1\r\n", "comment": { "comments": [ { "id": "223244", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Here's a non-Alloy version of the original issue that you can drop in an app.js and exhibit the same behavior. iOS works fine, Android crashes repeatedly in emulator, appears to do nothing on my Galaxy Nexus. I have a strong suspicion it has to do with animating the {center} values as replacing those with {top} seems to animate the logo just fine. And as the bouncing logo doesn't bounce on the x-axis, using {top} seems a valid and perhaps even more efficient solution.\n\nHave at it.\n\n{code:lang=javascript}\nfunction chainAnimate(view, animations) {\n function step() {\n if (animations.length == 0) {\n view = animations = null;\n return;\n }\n var animation = animations.shift();\n animation.addEventListener('complete', step);\n view.animate(animation);\n }\n step();\n};\n\nvar args = {\n opacity: 0.5, // Fade into the background after it settles\n durationIn: 1000, // Duration to slide onto the screen and become opaque\n durationBounce: 500, // Duration to bounce before settling\n durationFade: 2000, // Duration to fade to specified opacity\n bounciness: 0.25, // 0 = no bounce, 1 = full height bounce\n width: 216,\n height: 200\n};\nvar win = Ti.UI.createWindow({\n\tbackgroundColor: '#fff'\n});\nvar image = Ti.UI.createImageView({\n\tbottom: '100%',\n\topacity: 0,\n\timage: '/alloy.png',\n\theight: args.height,\n\twidth: args.width\n});\nwin.add(image);\n\nwin.addEventListener('open', function() {\n\tvar w = Ti.Platform.displayCaps.platformWidth; \n\tvar h = Ti.Platform.displayCaps.platformHeight; \n\tvar chain = [\n\t Ti.UI.createAnimation({ center: { x: w / 2, y: - h / 2 }, opacity: 0, duration: args.durationIn }),\n\t Ti.UI.createAnimation({ center: { x: w / 2, y: h / 2 + args.height * args.bounciness }, opacity: 1.0, duration: args.durationIn }),\n\t Ti.UI.createAnimation({ center: { x: w / 2, y: h / 2 - args.height * args.bounciness * 0.5 }, opacity: 1.0, duration: args.durationBounce }),\n\t Ti.UI.createAnimation({ center: { x: w / 2, y: h / 2 }, duration: args.durationBounce }),\n\t Ti.UI.createAnimation({ opacity: args.opacity, duration: args.durationFade })\n\t];\n\tchainAnimate(image, chain); \n});\nwin.open();\n{code}", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-12T04:13:09.000+0000", "updated": "2012-10-12T04:13:09.000+0000" }, { "id": "223389", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "@Bill: I wanted to make sure it wasn't a regression, so it was great that we investigated it. I also marked anything merge-3.0.0 as High since I figured if it needs to go into 3.0.0 at this point, it's a high priority issue. I've since downgraded it and moved it into 3.1.0.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-13T13:12:25.000+0000", "updated": "2012-10-13T13:12:25.000+0000" }, { "id": "250466", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "This actually seems to work pretty good right now on master (3.2.0) -- perhaps 3.1.0 as well, I didn't try that.\r\n\r\nI ran it on my Galaxy Nexus and the emulator (2.33). No crashing, and the behavior appeared to be the same on device vs. emulator. Looks pretty much the same when I run it on iPhone simulator as well.\r\n\r\nTo anyone else who tests: don't forget to get alloy.png and put it in Resources.", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-05-07T01:07:08.000+0000", "updated": "2013-05-07T01:07:08.000+0000" }, { "id": "262565", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Resolved as a part of https://github.com/appcelerator/titanium_mobile/pull/4398", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-20T18:24:40.000+0000", "updated": "2013-07-20T18:24:40.000+0000" }, { "id": "276444", "author": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix. The bouncy animation is fast & smooth, not slow.Also we do not see any app crash on the emulator.\r\n\r\nEnvironment:\r\nAppcel Studio : 3.2.0.201310230601\r\nTi SDK : 3.2.0.v20131022171645\r\nMac OSX : 10.8.5\r\nCLI - 3.2.0 with hash 72f7426b4ee6c2d2883c666d5b7e03906a16012f\r\nAndroid Emulator - 4.1.2", "updateAuthor": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-10-23T20:36:45.000+0000", "updated": "2013-10-23T20:36:45.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }