I had the same problem and now it is fixed with this line.
scale = new ScaleAnimation(1, 2, 1, 2,
ScaleAnimation.RELATIVE_TO_SELF, 0.5f,
ScaleAnimation.RELATIVE_TO_SELF, 0.5f);
On 14 avr, 21:48, "[email protected]"
<[email protected]> wrote:
> Hi
>
> I have an application which is based on the AnimateDrawables sample,
> but which usesScaleAnimationrather than TranslateAnimation
>
> TheproblemI have is that my image scales in the way I expect - but
> it also moves! For example, if my image starts half way down the
> screen on the left and I use an animation such as:
>
> an =ScaleAnimation(1,2,1,2);
>
> then the image doubles in size during the animation, but it also moves
> to the right and down to near the bottom of the screen.
>
> I've tried playing with the pivot values (setting them to 0, or to the
> middle of the image, or to half of the image width and height) but I
> get the same result.
>
> Any ideas???
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---