title: Android - draw gif with AnimatedImageDrawable on canvas
body: <p>I am currently trying to paint a gif onto my canvas in a viewSurface.My code so far looks like this:</p>
  <pre><code>    val victorySource = ImageDecoder.createSource(context.assets, &quot;victory.gif&quot;)
      victoryGif = ImageDecoder.decodeDrawable(victorySource) as AnimatedImageDrawable
      canvas = holder.lockCanvas()
      victoryGif.start()
      victoryGif.draw(canvas)
      holder.unlockCanvasAndPost(canvas)
  </code></pre>
  <p>But this will only draw the first picture of the Gif. Does anyone know how to properly draw a gif on a canvas (it doesn't matter if the answer is in Java or Kotlin)?</p>