[AC-2053] Android: view.animate() crashes
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | n/a |
| Status | Closed |
| Resolution | Needs more info |
| Resolution Date | 2013-01-25T18:20:07.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | n/a |
| Labels | triage |
| Reporter | Alvin Chan |
| Assignee | Mauro Parra-Miranda |
| Created | 2012-10-05T16:37:19.000+0000 |
| Updated | 2016-03-08T07:41:00.000+0000 |
Description
*Steps to Reproduce*
have UI that call view.animate()
install app to android device
launch app, when the animation is supposed to happen, watch the app crash and terminate
*Actual Result*
app crashes when view is animated
*Expected Result*
app does not crash when view is animated
*Test case*
var animateRight = Ti.UI.createAnimation({
left : 150,
duration : 150
});
var animateLeft = Ti.UI.createAnimation({
left : 0,
duration : 150
});
var win = Ti.UI.createWindow({
title : 'test',
backgroundColor : 'black',
});
var view = Ti.UI.createView({
backgroundColor : 'orange',
left : 0,
width : 300,
height : 200
});
var hasMoved = false;
view.addEventListener('touchend', function() {
if (!hasMoved) {
view.animate(animateRight);
}
else {
view.animate(animateLeft);
}
hasMoved = !hasMoved;
});
win.add(view);
win.open();
Alvin, can you please include a test case as a code sample?
Alvin, this is a very simple code sample using view.animate() method, working fine on TiSDK 2.1.3 GA.
Let us know if you still reproduce this issue, and in case please provide a runnable sample code we can use to reproduce it. Thanksvar win = Ti.UI.createWindow({ title:'test', backgroundColor:'black', }); var view = Ti.UI.createView({ backgroundColor:'orange', width:300, height:200 }); view.addEventListener('click', function(){ view.animate({left:20,height:400}) }); win.add(view); win.open();Not able to reproduce. We need a runnable sample code to reproduce the issue (like described here: https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report#HowtoSubmitaBugReport-CreatingaTestCase ) Marking as 'Closed'/'Need more info' - please reopen if needed.
Alvin, if you're there, we'd appreciate it if you could provide the android device version, device type, and a reproducible test case. Thanks!
I've set this to resolved so that the issue can now be edited to provide more info. Thanks, Daniel