0

I've a simple view animation, but I can't see to get "rid" of the animation "unwinding" (and I can't seem to find a solution online).

<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
  android:interpolator="@android:anim/linear_interpolator"
  android:shareInterpolator="true" >

  <scale
    android:duration="250"
    android:fromXScale="1"
    android:fromYScale="1"
    android:pivotX="50%"
    android:pivotY="50%"
    android:repeatCount="0"
    android:toXScale="1.1"
    android:toYScale="1.1" />

</set>

What this does is, simply, inflates the View by 10% proportionally, from the middle.

But, when it executes, it inflates and, when it reaches the end, it deflates back. I want to avoid that -- the "unwinding" effect -- when it scales back from 110% to 100%. How can that be done?

Edit:

I'm starting it simply with this:

Animation animation1 = AnimationUtils.loadAnimation(this, R.anim.<name>);
v.startAnimation(animation1);
Saran
  • 3,845
  • 3
  • 37
  • 59
  • possible duplicate of [How can I animate a view in Android and have it stay in the new position/size?](http://stackoverflow.com/questions/3345084/how-can-i-animate-a-view-in-android-and-have-it-stay-in-the-new-position-size) – Sergey Glotov May 30 '12 at 20:02

1 Answers1

1

The correct answer is found here: How can I animate a view in Android and have it stay in the new position/size?

It is putting this:

  android:fillAfter="true"
  android:fillEnabled="true"

inside the <set tag.

Community
  • 1
  • 1
Saran
  • 3,845
  • 3
  • 37
  • 59