If I forcely stop animation of an android ImageView sometimes, ImageView does not persist the stopping state of animation
<p>I am facing a weird animation problem in my current android project.</p>

<p>I am using scale animation to show a vertical progress bar to user. The animation is associated with an vertical ImageView ( width 20px, height = 400 px). I am doing this as android does not have a vertical progress bar.</p>

<p>Duration of this animation is 15 seconds. The idea is if user complete the requirement(it is like a quiz activity) less than 15 seconds (i.e, 3 seconds or may be 13 seconds) , the animation is then stopped and user should see the current state of ImageView that is the state at which animation is being stopped.</p>

<p>Sometimes, the ImageView rendering exactly the last state of its view but sometimes it is failing to shows the exact state rather showing some previous state. Not sure why.</p>

<p>Please, reply here if someone faced this types of problem previously or atleast please give me some heads up regarding this.</p>

<p>To stop animation I have used</p>

<p>scaleAnimation.cancel;
imgView.setAnimation(null);</p>

<p>To start animation I have used the following code</p>

<pre><code>scaleAnimation = new ScaleAnimation (1.0f, 1.0f, 1.0f, 0.0f ,0.0f, 0.0f);
scaleAnimation.setFillEnabled(true);
scaleAnimation.setFillAfter(true);
scaleAnimationOfLifeBar.setDuration(14000);
LinearInterpolator li = new LinearInterpolator();
scaleAnimation.setInterpolator(li);
imgView.setAnimation(scaleAnimationOfLifeBar);
imgView.startAnimation(scaleAnimationOfLifeBar);
</code></pre>

<p>if you need any more details please tell me I will try to explain more details.</p>
