can you reposition a view without using an animation?
is it possible to set top, left or center.x and center.y on a view, after it has already been created in a specific location? it's not working for me; the only thing working is to use an animation with a duration of 0. however, sometimes, there is a flicker.
example code:
view1.center.x = view2.center.x; view1.center.y = view2.center.y;
or
view1.animate({center:{x:view2.center.x, y:view2.center.y}, curve:Ti.UI.ANIMATION_CURVE_LINEAR, duration:0});
2 Answers
-
yes.
it won't animate when activated, but all you have to do is call it:
button1.addEventListener('click', function() { view1.top = 5; view1.left = 10; });
-
I don't know if it will work on a view (I don't see why not) but as an experiment I successfully animated a Button just using a for loop to alter the button's 'top' value.
hth.