ScaleAnimation problem

by » Wed, 15 Apr 2009 03:48:23 GMT

Sponsored Links

I have an application which is based on the AnimateDrawables sample,
but which uses ScaleAnimation rather than TranslateAnimation

The problem I 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???

ScaleAnimation problem

by vincebodi » Thu, 30 Apr 2009 02:05:58 GMT

 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, ""


Sponsored Links

Other Threads

1. Sony Ericsson Punya 9 Android Untuk 2011

.........keren emang......SE gitu lhooh


|| dari pc windows xp original ||
~ my porfolio foto ~

*Sony Ericsson Punya 9 Android Untuk 2011* GOPEGO.COM <http://GOPEGO.COM> | MARCH 14, 2011 Menurut Sony Ericsson, mereka merencanakan rilis sembilan ponsel Android di 2011 ini. Setelah Xperia Arc, Xperia Play, Xperia ... -- Shared via Pulse <>, an awesome news reader for iPad, iPhone and Android. Check it out! <> Sent from my iPhone -- ===============
-- ===============

2. Upgrade samsung galaxy 5 ke Froyo

Met siang,...
Mohon di share cara2 upgrade samsung galaxy 5 ke Froyo. Makasih sebelumnya...


3. Tela de Next >> Next <<BACK <<BACK

4. What more does my game need(space bike)

5. Mms-Sms database Thread Id Issue

6. About vertical Cover flow

7. Problem handling screen orientation