ScaleAnimation problem

by ellipsoidmob...@googlemail.com » Wed, 15 Apr 2009 03:48:23 GMT


Sponsored Links
 Hi

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, "ellipsoidmob...@googlemail.com"



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. Mod: Member Milis ID-Android Tembus Angka 6500

Rekan-rekan komunitas id-android yang berbahagia, hari ini (Senin),
28 Februari 2011, jumlah member (basis E-mail) milis id-android tembus angka
6500. Kalau kita flashback, bulan Desember 2009 jumlah kita masih ratusan
dibawah angka 1000, dalam waktu 15 bulan jumlah member id-android
sudah tembus 6500.
Semoga Komunitas ID-Android tetap bermanfaat buat semua.

Join: id-android+subscr...@googlegroups.com
id-android+subscr...@googlegroups.com

 http://forum.android.or.id/   (Under Construction)



-- 
Salam,


Agus Hamonangan

Founder 

2. apakah ada yg tahu, kapan Samsung Galaxy GIO dijual di Indonesia ?

Rekan rekan, saya mau tanya : apakah ada yg tahu, kapan Samsung Galaxy GIO
dijual di Indonesia ?

terima kasih

-- 
===============

3. Hp android yg kuat buat pes 2011

4. Is there any way to know Canvas is using hardware scaling or not?

5. [WTI] Motorola Xoom Overclock to 1.5Ghz, hasil nya ?

6. help suhu, suhi n teman android

7. Mohon Maaf ...