AnimationDrawable animates fast after visibility(gone) followed by visibility(visible)
<p>I have an ImageView that is being used to show some frame animation.
The Duration for these images are all set to 100.</p>

<p>However, the ImageView needs to be hidden sometimes. So the animation is stopped and the ImageView is set to GONE.</p>

<p>When it's time to show the ImageView again, its visibility is set to VISIBLE and the animation is started.</p>

<p>HOWEVER - now the animation is really fast; instead of a duration of 100, it looks like 50. But when I check the duration it still says 100 - but it definitely doesn't look like it.</p>

<p>The code to hide and show the ImageView is as follows:</p>

<pre><code>    //hide the animation
    final AnimationDrawable frameAnim = (AnimationDrawable) animImgView.getBackground();
    if (frameAnim.isRunning() == true)
    {
        frameAnim.stop();
    }

    frameAnim.setVisible(false, false);
    animImgView.setVisibility(View.GONE);




    //show animation
    animImgView.setVisibility(View.VISIBLE);

    final AnimationDrawable frameAnim = (AnimationDrawable) animImgView.getBackground();
    frameAnim.setVisible(true, true);
    frameAnim.start();
</code></pre>

<p>What could be the trouble ?</p>
