[AC-2386] Animation 'complete' event does not fire if animation created with passed object
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | n/a |
| Status | Closed |
| Resolution | Cannot Reproduce |
| Resolution Date | 2013-04-05T20:59:38.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | Documentation |
| Labels | api |
| Reporter | John Law |
| Assignee | Shak Hossain |
| Created | 2012-12-15T16:21:26.000+0000 |
| Updated | 2016-03-08T07:41:25.000+0000 |
Description
The following code does not work
var tableFadeIn = Titanium.UI.createAnimation({duration:1000});
tableFadeIn.opacity = 1;
tableFadeIn.visible = true;
//tableFadeIn.duration = 1000;
tableFadeIn.addEventListener('complete',function() {
Ti.API.info("never gets here");
});
The following code does work
var tableFadeIn = Titanium.UI.createAnimation();
tableFadeIn.opacity = 1;
tableFadeIn.visible = true;
tableFadeIn.duration = 1000;
tableFadeIn.addEventListener('complete',function() {
Ti.API.info("gets here");
});
Tested with SDK 3.0.2.GA and the following code:
At the end of the animation, I can see the message in the log.var win = Ti.UI.createWindow({ backgroundColor: 'black' }); var view = Ti.UI.createView({ backgroundColor: 'yellow', width: 100, height: 100, opacity: 0 }); var tableFadeIn = Titanium.UI.createAnimation({duration:1000}); tableFadeIn.opacity = 1; tableFadeIn.visible = true; tableFadeIn.addEventListener('complete',function() { Ti.API.info("never gets here"); }); win.add(view); win.open(); view.animate(tableFadeIn);We have not heard back from you since you posted the issue. Not sure if this is still an issue that need a fix from our platform team. If so, please send us a test case so that we can take next necessary step to fix. If we don't hear back, we will assume the issue is no longer valid and close it.