{ "id": "91402", "key": "TIMOB-9005", "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": "13403", "description": "Sprint 2012-11 Core", "name": "Sprint 2012-11 Core", "archived": true, "released": true, "releaseDate": "2012-06-03" } ], "resolution": { "id": "6", "description": "", "name": "Hold" }, "resolutiondate": "2012-05-25T17:14:57.000+0000", "created": "2012-05-05T13:24:05.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "core", "parity" ], "versions": [ { "id": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" } ], "issuelinks": [ { "id": "17483", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "92425", "key": "TIMOB-9286", "fields": { "summary": "Android: Animation code review", "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" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } } ], "assignee": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-21T21:12:54.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": "Not able to animate after an animation completes. Same code works fine on iOS platform.\r\nCode example: http://pastebin.com/w23d43p4. \r\n\r\nSize animation also does not seem to respect which point should be the center of the animation. Again, it works on iOS as expected.", "attachment": [], "flagged": false, "summary": "Android: Not able to animate after an animation is complete", "creator": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "196169", "author": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Currently Android animations support code is quite complicated (and old) due to various Android bugs and versioning. \r\nAndroid animations as a whole needs to be reviewed for complete redesign.\r\n\r\nRegarding this particular issue, there is a workaround exists which is to update view properties after animation (as it mentioned at [Titanium.UI.View docs|http://docs.appcelerator.com/titanium/2.0/index.html#!/api/Titanium.UI.View-method-animate])\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: 'blue'\r\n});\r\n\r\nvar circle = Titanium.UI.createView({\r\n\theight:100,\r\n\twidth:100,\r\n\tborderRadius:50,\r\n\tbackgroundColor:'yellow',\r\n\ttop:10\r\n});\r\n\r\nwin.add(circle);\r\n\r\nwin.open();\r\n\r\nvar RR = { UI:{ coupon: {} } };\r\n\r\nRR.UI.coupon.breatheRising = function(widget, style){\r\n if(!widget){ return; }\r\n \r\n widget.animate({\r\n transform: Ti.UI.create2DMatrix(),\r\n opacity: 1,\r\n duration: 2000\r\n }, function(){\r\n widget.opacity = 1; // <--- add this line for workaround\r\n RR.UI.coupon.breatheFalling(widget, style);\r\n }); \r\n};\r\nRR.UI.coupon.breatheFalling = function(widget, style){\r\n if(!widget){ return; }\r\n var animation;\r\n if(style == 'size'){\r\n animation = {transform: Ti.UI.create2DMatrix({scale: 0.8}), duration: 2000};\r\n } else {\r\n animation = {opacity:0.2, duration: 2000};\r\n }\r\n widget.animate(animation, function(){\r\n\t widget.opacity = 0.2; // <--- add this line for workaround\r\n RR.UI.coupon.breatheRising(widget, style);\r\n }); \r\n \r\n};\r\n \r\nRR.UI.coupon.breathe = function(widget, style){\r\n style = style || 'size';\r\n if(style == 'opacity'){\r\n widget.opacity = 0.2;\r\n } else { // size\r\n widget.transform = Ti.UI.create2DMatrix({scale: 0.8});\r\n }\r\n setTimeout(function(){\r\n RR.UI.coupon.breatheRising(widget, style);\r\n }, 1000);\r\n \r\n};\r\n\r\nRR.UI.coupon.breathe(circle, 'opacity');\r\n{code} ", "updateAuthor": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-25T17:06:28.000+0000", "updated": "2012-05-25T17:06:28.000+0000" }, { "id": "414421", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket due to the time that has passed since this was filed.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-21T21:12:54.000+0000", "updated": "2017-03-21T21:12:54.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }