[TIMOB-6227] Android: animate callback never gets executed when using Ti.UI.createAnimation
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | High |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2012-09-21T04:54:48.000+0000 |
| Affected Version/s | Release 1.8.0, Release 2.0.1 |
| Fix Version/s | Release 2.0.1, Release 3.0.0, Sprint 2012-19 API, 2012 Sprint 19 |
| Components | Android |
| Labels | api, module_animation, parity, qe-review, qe-testadded |
| Reporter | Jon Alter |
| Assignee | Hieu Pham |
| Created | 2011-11-17T18:23:25.000+0000 |
| Updated | 2013-11-27T12:16:24.000+0000 |
Description
Animate callback never gets called if you use Ti.UI.createAnimation. It get called if you use an object instead.
Step 1: Run the code below
Step 2: click the window
Step 3: notice that the info statement never shows
Step 4: in animate() replace 'animation' with 'animationObj'.
Step 5: run code
Step 6: click the window
Step 7: notice the info statement in the callback shows up.
var win = Ti.UI.createWindow({
backgroundColor:'blue'
});
win.addEventListener('click',function(e){
Ti.API.info('CLICKED');
var animation = Ti.UI.createAnimation({
backgroundColor:'red',
duration: 500
});
var animationObj = {backgroundColor:'red', duration:2000};
win.animate(animation, function(){
Ti.API.info('DONE!!!');
});
});
win.open();
Tested on 2.0.1GA2 with a Samsung Galaxy S2, unable to reproduce this issue. Ticket closed.
This still exists on 2.0.1.GA2
Tested with 3.0.0.20121204144658 on Droid 1 2.2.3
Anvil test case added. PR link: https://github.com/appcelerator/titanium_mobile/pull/5037