title: How to make Jetpack Compose Image animating infinite
body: <p>I have an <code>animated-vector</code> drawable.
  I want this animated vector to be animated in loop while this image is showing.
  Cannot find a good solution for this.</p>
  <pre class="lang-kotlin prettyprint-override"><code>        val image = animatedVectorResource(R.drawable.no_devices_animated)
          var atEnd by remember { mutableStateOf(false) }
          Image(
              painter = image.painterFor(atEnd),
              &quot;image&quot;,
              Modifier.width(150.dp).clickable {
                  atEnd = !atEnd
              },
              contentScale = ContentScale.Fit)
  </code></pre>
  <p>When I tap on the image it is animating but then stops. This is kind of an infinite progress.</p>