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. HTC Hero Sprint 2n

Karena HTC Eris udah laku, mau lepas Android CDMA yang satu lagi :)
- HTC Hero Sprint.
Harga NETT: *Rp 3,3jt*

Kondisinya bisa dibilang 90% aja karena dah dipakai sekitar 2-3 bulanan.
Kelengkapan cuma handset, charger dan kabel data (dulu beli dari baru juga
batangan).

Bonus: *Casing* *Silicone Jelly* :)

Lokasi: Jakarta Barat (Home) & Jakarta Selatan (Office).
COD kalau weekdays di Mall Ambasador atau Senayan City, weekend di Mall
Citraland atau Mall Taman Anggrek.

Japri: *deska...@gmail.com*
Nomor telepon ada di Sigy.

Admin & Mods, makasih jalumnya :)

*************
Deska Affif
088-1100-GAYA (4292) | Y!: GadgetGaya
www.gadgetgaya.com  |  Light Up Your Gadget!

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

2. Routing Audio data to Both HEADSET and SPEAKER.

Hi,

As particular need, I want to route the Audio data to both HEADSET and
SPEAKER. For example if I play a Music file, I want that the output
should come on speaker and on headset as well. My first question is
weather is it possible or not in the current clair SDK.

As per my understanding, the Headset plugging/unplugging is detected
by the kernel switch driver and the event is sent to
HeadsetObserver.java. Then HeadsetObserver.java broadcasts the intent
Intent.ACTION_HEADSET_PLUG with information about state as plugged/
unplugged. This intent is received by PhoneApps.java and the
audiomanager/audioFlinger is informed to turn on/off the speaker. The
audioManager/AudioFlinger further passes the information to
Libaudio.so (AudioHardware.cpp). Then in the end the information is
passed to kernel to switch between the speakerphone and Headset.

I have found a case in AudioHardware.cpp as
SND_DEVICE_HEADSET_AND_SPEAKER.

That being said, please tells me how I can enable both the Headset and
Speakerphone. Incase required, I can furnish more investigation, what
I have done so far.

Thanks
Anand

-- 

3. No place in Google Checkout to set international tax rates. Do we owe? How to Pay?

4. AlertDialog - selected item

5. Statusbar source code in android

6. Ssst backflip

7. Camera Emulation on Android