On Jan 4, 9:21 am, Hari Edo <[email protected]> wrote:
> I've tried almost exactly the same scenario.  It seems like the
> fromXScale="1.0" does not match the actual apparent size of the view.
> 1.0 was quite a bit bigger than the original view size.

Replying to myself, I think this is definitely a defect, but I've only
experimented on one (v2.1) SDK level.

If I want the throb to go smoothly from 100% -> 120% -> 100%, I need
to write the animation to go from 0.83333 -> 1.2 -> 0.83333 instead.
Note that 0.83333 is actually the reciprocal, or 1.0/1.2, of my
"toXScale"
value at the middle of the throb animation set.

If I want it to go from 100% -> 130% -> 100% instead, then the
same kind of reciprocal math is required to figure out the
"fromXScale"
values that should be 1.0.

I include the relevant fillBefore="false" fillAfter="false" but they
actually make no difference here in practice.

<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android";
    android:shareInterpolator="false" >
        <scale
        android:interpolator="@android:anim/
accelerate_decelerate_interpolator"
        android:fromXScale="0.8333" android:fromYScale="0.8333"
        android:toXScale="1.2" android:toYScale="1.2"
        android:pivotX="50%" android:pivotY="50%"
        android:fillAfter="false" android:duration="350" />
        <scale
        android:startOffset="350" android:fillBefore="false"
        android:interpolator="@android:anim/
accelerate_decelerate_interpolator"
        android:fromXScale="1.2" android:fromYScale="1.2"
        android:toXScale="0.8333" android:toYScale="0.8333"
        android:pivotX="50%" android:pivotY="50%"
        android:fillAfter="false" android:duration="250" />
</set>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to