在android中显示心脏动画

use*_*910 1 android

我正在使用以下动画在 android 中获得心脏吹动效果,但动画看起来像心脏符号变小然后变大,但我想要反之亦然效果(首先它应该变大然后变小)。

我真的不明白如何修改这个动画以获得大图像。

使用的动画:

<scale xmlns:android="http://schemas.android.com/apk/res/android"
    android:duration="1000"
    android:fromXScale="1"
    android:fromYScale="1"
    android:pivotX="50%"
    android:pivotY="50%"
    android:repeatCount="1"
    android:repeatMode="reverse"
    android:toXScale="0.5"
    android:toYScale="0.5" />
Run Code Online (Sandbox Code Playgroud)

请帮我解决这个问题。

Mat*_*ula 5

听起来你正在寻找这样的东西。编辑 from/to 比例以实现您正在寻找的效果。

   <scale xmlns:android="http://schemas.android.com/apk/res/android"
    android:duration="1000"
    android:fromXScale="1"
    android:fromYScale="1"
    android:pivotX="50%"
    android:pivotY="50%"
    android:repeatCount="1"
    android:repeatMode="reverse"
    android:toXScale="1.5"
    android:toYScale="1.5" />
Run Code Online (Sandbox Code Playgroud)