如何用动画增加图像两倍?

How to increase the image twice with the animation?

我想移动图像并同时增加两次。但是如何放大图像并将其原始尺寸指定为 100%?我尝试执行以下操作,但它不起作用:

<set xmlns:android="http://schemas.android.com/apk/res/android"
    android:interpolator="@android:anim/linear_interpolator">
    <scale
        android:duration="300"
        android:fillAfter="true"
        android:fromXScale="100%p"
        android:fromYScale="100%p"
        android:toXScale="150%p"
        android:toYScale="150%p" />
    <translate
        android:duration="500"
        android:fillAfter="true"
        android:fromYDelta="0"
        android:toYDelta="-100" />
</set>

谢谢。

试试这个:

<set xmlns:android="http://schemas.android.com/apk/res/android"
    android:interpolator="@android:anim/linear_interpolator"
    android:fillAfter="true">
    <scale
        android:duration="300"
        android:fromXScale="100%"
        android:fromYScale="100%"
        android:toXScale="150%"
        android:toYScale="150%"
        android:pivotX="50%"
        android:pivotY="50%" />
    <translate
        android:duration="500"
        android:fromYDelta="0"
        android:toYDelta="-100" />
</set>

那应该没问题。确保将其加载到代码中。