[TIMOB-2776] Android: Animation callback is called multiple times.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T02:00:03.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.6.0 M07 |
Components | Android |
Labels | android, defect, enterprise, release-1.6.0, rplist |
Reporter | Fred Spencer |
Assignee | Don Thorp |
Created | 2011-04-15T03:29:16.000+0000 |
Updated | 2011-04-17T02:00:03.000+0000 |
Description
See log.
var win = Ti.UI.createWindow({
navBarHidden: true,
exitOnClose: true,
backgroundColor: '#fff'
});
var view = Ti.UI.createView({
width: 50,
height: 50,
left: 0,
top: 0,
backgroundColor:'#f00'
});
var animateBtn = Ti.UI.createButton({
left: 10,
right: 10,
height: 50,
title: 'Animate'
});
animateBtn.addEventListener('click', function(e) {
view.animate({
top: Ti.Platform.displayCaps.platformHeight - view.height,
left: Ti.Platform.displayCaps.platformWidth - view.width,
duration: 1000
},
function(e) {
Ti.API.info('This is called multiple times.');
});
});
win.add(animateBtn);
win.add(view);
win.open();
(from [aa8eb0af3564cca62e04fd8e561a019a57bf6c11]) don't allow clearAnimation to cause our animation listener to be re-entrant [#2776 state:fixed-in-qa milestone:"Release 1.6.0 M04"]
https://github.com/appcelerator/titanium_mobile/commit/aa8eb0af3564cca62e04fd8e561a019a57bf6c11"> https://github.com/appcelerator/titanium_mobile/commit/aa8eb0af3564...
[INFO] Titanium SDK version: 1.6.0 (01/10/11 08:25 3452f06), I only see the fix on 2.2 (droid 1 -2.2.1 and sim 2.2) while on 2.1 sim and 1.6 device, I see:
I/TiAPI ( 4931): (kroll$4) [3458,20554] This is called multiple times.
I/TiAPI ( 4931): (kroll$4) [4,20558] This is called multiple times.
Moving to M07 so it can get worked.
(from [133d37e7f4d02329bb4a91ca71b90225210430c1]) only fire animation complete when the completion comes from the parent AnimationSet [#2776 state:fixed-in-qa]
https://github.com/appcelerator/titanium_mobile/commit/133d37e7f4d02329bb4a91ca71b90225210430c1"> https://github.com/appcelerator/titanium_mobile/commit/133d37e7f4d0...
verified emulator 2.2 with test case from Fred. animate callback is invoked only once.