I took the xml animation directly from the android documents and as far as I can see, it does not work on my emulator 2.1 update 1, nor on my 2.1 update 1 Galaxy S device.
In particular, I am trying to create an animation to throb the view (i.e. make it smaller than more in one animation) This is a very simple markup:
<?xml version="1.0" encoding="utf-8"?>
<set
xmlns:android="http://schemas.android.com/apk/res/android">
<scale
android:fromXScale="1.0"
android:toXScale="0.5"
android:fromYScale="1.0"
android:toYScale="0.5"
android:pivotX="50%"
android:pivotY="50%"
android:duration="1000" />
<set android:startOffset="1000">
<scale
android:fromXScale="0.5"
android:toXScale="1.0"
android:fromYScale="0.5"
android:toYScale="1.0"
android:pivotX="50%"
android:pivotY="50%"
android:duration="1000" />
</set>
</set>
So, I am trying to achieve to reduce the view from its size to half of it in a second, then increase it to its original size for more than a second. To repeat the repetition, within two seconds it should start from the original → half size → the original.
,
( X/YScale 1.0),
.
- ?
. ,
!?
, "Tween Animation"
http://developer.android.com/guide/topics/graphics/2d-graphics.html
, . !
- ?
!
.