<p dir="auto"><em>Glide</em>: 3.7.0<br>
<em>Integration libraries</em>: no<br>
<em>Devices</em>: currently running on emulator only, hardware GPU rendering<br>
<em>Issue</em>: animated GIFs generally work well, except that the final frame's delay is being ignored.  The product design involves having a long delay on the last frame so that the final rendering can be reviewed again.  Instead the last frame flashes quickly and then it returns to the beginning.<br>
A secondary issue: not only should it be waiting to cycle back to the beginning for the amount stated in the duration, but the particular GIFs being tested are set to only 1 iteration (meaning in theory they should not ever recycle).<br>
To reproduce, generate a GIF with a long delay on the last frame.  Then display the GIF.  It appears to flicker right back to the beginning.  Viewing the same GIF in a web browser or posting to e.g. FB messenger, the delay is properly observed.</p>
<p dir="auto"><em>Layout Design</em>: FrameLayout with a single ImageView inside.  (added) These are inside a RecyclerView.  I am testing with ~ 20 items at one time.<br>
<em>Code Design</em>: using a RecyclerViewAdapter; Glide code is in onBindViewHolder</p>
<p dir="auto"><em>Error Messages</em>: I am getting the following, from reading up it doesn't sound like this is related but curious of others' opinions:<br>
W/Bitmap: Called reconfigure on a bitmap that is in use! ...</p>
<p dir="auto"><strong>Glide Version:</strong> 3.6.1<br>
<strong>Issue details:</strong><br>
While loading GIF's there is significant delay before showing <strong>only</strong> the second frame, and this happens only for the first loop, all the later loops goes with expected delay.</p>
<p dir="auto">So after doing some research, I thought it may be because Glide is resizing the frames, so I override resize operation using <code class="notranslate">override()</code>.</p>
<p dir="auto"><strong>Below is the Glide load line:</strong><br>
<code class="notranslate">Glide.with(this).load(trainingItem.getUrl()).asGif().override(Target.SIZE_ORIGINAL, Target.SIZE_ORIGINAL).diskCacheStrategy(DiskCacheStrategy.SOURCE).into(draweeView);</code></p>
<p dir="auto">But still there is significant delay before showing the next frame for the very first loop.<br>
Any suggestions/pointers?</p>