Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (android)
Viewing all articles
Browse latest Browse all 7655

Titanium view animation issue

$
0
0

Hi everyone, I am trying to create a view and an animation associated to the view. Here is the part of the code with those elements:

var mainView = Titanium.UI.createView{(width:100, height:100, top:0, left:0, backgroundColor:'white')};
mainView.animate({top:50, left:50, backgroundColor:'#246810', duration:1000});
When I run the code, the background color of the view changes from black to a kind of dark green, but it is still in the same position. I think the problem comes from the animation because when I change the top property in a seperate line, it works fine. Does someone know how to fix this?

I use an Android emulator (Genymotion).


Viewing all articles
Browse latest Browse all 7655

Trending Articles