如何用动画将图像增加两次?

马克·科若夫(Mark Korzhov)

我想移动图像并同时增加两次。但是,如何将图像的原始尺寸指定为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>

那应该工作正常。确保将其加载到代码中。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章