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. Youtube Upload

Hi all,
Plz provide information about youtube APIs for uploading video in
android platform.
Is Google Data APIs are helpful?? Plz share some references.

Thanks.

-- 

2. Bluetooth SCO... start/stop versus setOn(bool)

I do not understand the model of

AudioManager.startBluetoothSco()
AudioManager.stopBluetoothSco()

and

AudioManager.setBluetoothScoOn(boolean)

The description in the documentation is not clear.

is start/stopness an underlying state for on/offness?

Is SCO started/stopped for the whole device, or a particular app?
How about on/off?

How do either of these relate to whether a headset is (or is not) in
"Voice Dialing mode", e.g.:  BluetoothHeadset.startVoiceRecognition()
and BluetoothHeadset.stopVoiceRecognition() ?

Thanks in advance.

tone

-- 

3. Permisi dan salam kenal

4. [WTA] HTC Evo sebagai modem dial up (bukan tethering)

5. [Perkenalan] Member baru, greetings mortals

6. Paging Desire Z users....

7. RUT problem help!