Monday, May 6, 2013

[android help] Android ScaleAnimation and TranslateAnimation, how to avoid ScaleAnimation movement


I have an AnimationSet with inside a ScaleAnimation and a TranslateAnimation like this:


TranslateAnimation:



TranslateAnimation goTopFromRight =
new TranslateAnimation(0, -(right.getLeft()-top.getLeft()),
0,-(right.getTop()-top.getTop()));


ScaleAnimation:



ScaleAnimation = setSizeForTop = new ScaleAnimation(1, 2, 1, 2);


and AnimationSet:



bringToLeftFromTopAnimationSet = new AnimationSet(true);
bringToTopFromRightAnimationSet.addAnimation(goTopFromRight);
bringToTopFromRightAnimationSet.addAnimation(setSizeForTop);


The problem is that when i try to use only the ScaleAnimation, my item goes to the position i want, but whe I am using the ScaleAnimation with the TranslateAnimation in the AnimationSet, my item translates more than i need, as if ScaleAnimation introduces some supplementary movements abd I don't know how to delete them.


Thank you for your help.



.

stackoverflow.comm

No comments:

Post a Comment

Google Voice on T-Mobile? [General]

Google Voice on T-Mobile? So I recently switched from a GNex on Verizon to a Moto X DE on T-Mobile. I had always used Google Voice for my v...