<div class="highlight highlight-source-groovy-gradle notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="   //glide
    compile 'com.github.bumptech.glide:glide:3.7.0'
    compile 'com.github.bumptech.glide:okhttp3-integration:1.4.0@aar'"><pre class="notranslate">   <span class="pl-c"><span class="pl-c">//</span>glide</span>
    compile <span class="pl-s"><span class="pl-pds">'</span>com.github.bumptech.glide:glide:3.7.0<span class="pl-pds">'</span></span>
    compile <span class="pl-s"><span class="pl-pds">'</span>com.github.bumptech.glide:okhttp3-integration:1.4.0@aar<span class="pl-pds">'</span></span></pre></div>
<p dir="auto">Device/Android Version:<br>
Samsung Galaxy7 edge, android 6.0<br>
meizu mx5, android 5.0</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="     Glide.with(context)
                .load(url)
                .asGif()
                .dontAnimate()      
                .placeholder(R.drawable.ic_stub)
                .error(R.drawable.ic_error)
                .into(imageView);"><pre class="notranslate">     <span class="pl-smi">Glide</span>.<span class="pl-en">with</span>(<span class="pl-s1">context</span>)
                .<span class="pl-en">load</span>(<span class="pl-s1">url</span>)
                .<span class="pl-en">asGif</span>()
                .<span class="pl-en">dontAnimate</span>()      
                .<span class="pl-en">placeholder</span>(<span class="pl-smi">R</span>.<span class="pl-s1">drawable</span>.<span class="pl-s1">ic_stub</span>)
                .<span class="pl-en">error</span>(<span class="pl-smi">R</span>.<span class="pl-s1">drawable</span>.<span class="pl-s1">ic_error</span>)
                .<span class="pl-en">into</span>(<span class="pl-s1">imageView</span>);</pre></div>
<p dir="auto">GIF will show some GIF frame is incomplete, but these GIF in the computer and other applications show no problem, so the GIF itself should be no problem.<br>
ps:I try to use fresco no problem</p>
<p dir="auto">Hi! I'm using Glide in a Listview that loads preview images</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Glide.with(activity)
.load(stringUrl)
.centerCrop()
.crossFade()
.into(imageView);"><pre class="notranslate"><span class="pl-smi">Glide</span>.<span class="pl-en">with</span>(<span class="pl-s1">activity</span>)
.<span class="pl-en">load</span>(<span class="pl-s1">stringUrl</span>)
.<span class="pl-en">centerCrop</span>()
.<span class="pl-en">crossFade</span>()
.<span class="pl-en">into</span>(<span class="pl-s1">imageView</span>);</pre></div>
<p dir="auto">How can I fetch this loaded image file from cache?<br>
Or better, can I set a name to a file when is saved in cache?</p>
<p dir="auto">I know how to get cache directory that uses Glide<br>
<code class="notranslate">File cacheFile = Glide.getPhotoCacheDir();</code></p>
<p dir="auto">but when I list files I see this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/image_manager_disk_cache/ed35732ad0c7351708bd024cb2b423a055dbe79f592d48f4241940f344f2e75f.0"><pre class="notranslate"><code class="notranslate">/image_manager_disk_cache/ed35732ad0c7351708bd024cb2b423a055dbe79f592d48f4241940f344f2e75f.0
</code></pre></div>