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. Which one to buy ? Droid x vs nexus one ?

Hi,

For my tests I have to buy a real android phone. Emulator is cool but
I need a real one to really test my application.

Does anyone know which one is the more representative and the best to
test my application ? (my target is android 2.2)

Thanks,
Kim

-- 

2. OOT --- WTI: "Sinetron" Uji Pakai AHA Tamat

"Sinetron" uji pakai layanan EvDO AHA akhirnya berhasil saya tamatkan.
Total ada sepuluh episode. Berarti, satu episode lebih banyak daripada
yang saya rencanakan semula. 

Berikut petikan episode terakhirnya:

Uji Pakai AHA dalam Angka* Dilakukan di sembilan lokasi dalam dua hari
* Meludeskan enam porsi makanan dan delapan gelas/botol/poci minuman
* Menghabiskan aneka makanan dan minuman dengan total tagihan Rp 229.914
* Memanfaatkan layanan EvDO AHA selama 15 jam 13 menit 34 detik
* Mengonsumsi data sebanyak 3,672 GB yang merupakan hasil penjumlahan
volume data yang diunduh dan diunggah
* Tidak diketahui berapa kilometer yang telah ditempuh dalam dua hari
tersebut
* Penambahan berat badan akibat banyak makan minum selama proses
pengujian juga tidak diukur 

Silakan membaca versi kompletnya di www.ponselmu.com. Sebab, kalau semua
saya copy paste-kan ke sini akan sangat panjang. 

Twitter @herrysw


Salam
,

Herry SW

-- 
"Indonesian Android Community [id-android]" 

3. Plz help. android emulator on eclipse

4. Is anyone successfully using custom InputFilter instances?

5. FTDI USB-RS232 Driver for Android

6. INFO/wpa_supplicant(19359): workaround,Just skip it

7. trying to override OEM(Incoming call screen) screen