[TIMOB-10362] Android: Redraw problem on animation
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2013-03-20T17:47:14.000+0000 |
Affected Version/s | Release 2.1.0 |
Fix Version/s | Backlog |
Components | Android |
Labels | core, exalture, insight |
Reporter | Martin Guillon |
Assignee | Sunila |
Created | 2012-07-21T03:19:13.000+0000 |
Updated | 2017-03-21T21:27:23.000+0000 |
Description
I have a button that triggers a animation. But each time i press the animation is replayed from the start.
The problem is that while replaying you can still see the animated view at its destination position(so you it twice).
var win = Ti.UI.createWindow({ fullscreen: true, backgroundColor: 'white'});
var button = Ti.UI.createButton({
title:'Translate',
width:100,
height:50,
top:0
});
win.add(button);
//label using localization-ready strings from <app dir>/i18n/en/strings.xml
var view = Ti.UI.createView({
backgroundColor:'red',
height:100,
width:100
});
win.add(view);
//Add behavior for UI
button.addEventListener('click', function(e) {
if (!view.hasOwnProperty('currentTransform'))
{
var transform = Ti.UI.create2DMatrix().translate(0,200);
view.currentTransform = transform;
view.animate({transform:transform, duration:400})
Ti.API.info('first transform')
}
else
{
view.transform = Ti.UI.create2DMatrix(); //reset!
view.animate({transform:view.currentTransform, duration:400})
Ti.API.info('next transform')
}
});
win.open();
I can't reproduce this. Tried with SDK 3.1.0. I don't see the animation image on the target.
You are right i dont even see it anymore with the 3.0.2.GA. I guess it s fixed. Great job
Closing ticket as the issue cannot be reproduced.