Titanium JIRA Archive
Appcelerator Community (AC)

[AC-2053] Android: view.animate() crashes

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionNeeds more info
Resolution Date2013-01-25T18:20:07.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelstriage
ReporterAlvin Chan
AssigneeMauro Parra-Miranda
Created2012-10-05T16:37:19.000+0000
Updated2016-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();

Comments

  1. Ingo Muschenetz 2012-10-10

    Alvin, can you please include a test case as a code sample?
  2. Federico Casali 2012-11-02

    Alvin, this is a very simple code sample using view.animate() method, working fine on TiSDK 2.1.3 GA.
       var 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();
       
    Let us know if you still reproduce this issue, and in case please provide a runnable sample code we can use to reproduce it. Thanks
  3. Federico Casali 2012-11-07

    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.
  4. Daniel Sefton 2012-12-04

    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!
  5. Daniel Sefton 2013-01-25

    I've set this to resolved so that the issue can now be edited to provide more info. Thanks, Daniel

JSON Source