Reputation: 909
I am using the following animation to get the Heart blowing effect in android,but the animation is looking like heart symbol is getting small and then bigger,but I want the viceversa effect(first it should become large and then small).
I really didnt understand how to modify this Animation for getting that large image.
Animation Used:
<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" />
Please help me in solving this issue.
Upvotes: 1
Views: 1242
Reputation: 2664
Try this this animation..animates the view to the small and large and vice versa
<scale xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="1000"
android:fromXScale="0.5"
android:fromYScale="0.5"
android:pivotX="50%"
android:pivotY="50%"
android:repeatCount="infinite"
android:repeatMode="reverse"
android:toXScale="1.5"
android:toYScale="1.5" />
Upvotes: 1
Reputation: 268
It sounds like you are looking for something like this. Edit the from/to scales to achieve the effect you are looking for.
<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" />
Upvotes: 5