<p dir="auto"><strong>Glide Version</strong>: 3.8.0</p>

<p dir="auto"><strong>Integration libraries</strong>: Volley</p>

<p dir="auto"><strong>Device/Android Version</strong>: Motorola G4 Plus/ 7.0 , Asus P024 Tablet/ 6.0.1, Oneplus One/5.0.2,</p>

<p dir="auto"><strong>Issue details / Repro steps / Use case background</strong>:  I am loading an image with a background #f9f9f9 <a href="https://teafloor.com/media/catalog/product/t/h/the-tea-explorer-1.jpg" rel="nofollow">this image</a>. So I have made a layout with a background color #f9f9f9. Inside which I have an image view. The problem is the image background color is different in each of the mentioned devices.</p>
<p dir="auto">Moto G4 Plus Android 7.0<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/16386061/27080508-cdc44a72-5059-11e7-85b7-cd6f80af93be.png"><img src="https://user-images.githubusercontent.com/16386061/27080508-cdc44a72-5059-11e7-85b7-cd6f80af93be.png" alt="moto g4 plus 7 0" style="max-width: 100%;"></a></p>
<p dir="auto">Asus P024 Tablet Android 6.0.1<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/16386061/27080512-d1779106-5059-11e7-8a44-ba91a56d2407.jpg"><img src="https://user-images.githubusercontent.com/16386061/27080512-d1779106-5059-11e7-8a44-ba91a56d2407.jpg" alt="asus tablet 6 0 1" style="max-width: 100%;"></a></p>
<p dir="auto">OnePlus One Android 5.0.2<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/16386061/27080513-d30dc080-5059-11e7-8930-7e6e2278409b.png"><img src="https://user-images.githubusercontent.com/16386061/27080513-d30dc080-5059-11e7-8930-7e6e2278409b.png" alt="oneplus 5 0 2" style="max-width: 100%;"></a></p>
<p dir="auto">The nougat device loads the image with some transparent color.<br>
The Marshmallow device loads the image with #f7f7f7 color<br>
The Lollipop device loads the image with #b9b9b9 color.</p>
<p dir="auto">I have used Picasso for the same image and it loads the image perfectly.</p>
<p dir="auto">Why is this happening?</p>

<p dir="auto"><strong>Glide load line / <code class="notranslate">GlideModule</code> (if any) / list Adapter code (if any)</strong>:</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="public static void glideImageLoader(Context mContext, String imgUrl, ImageView imageView) {
        Glide.with(mContext).load(imgUrl)
                .thumbnail(0.5f)
                .crossFade()
                .diskCacheStrategy(DiskCacheStrategy.SOURCE)
                .into(imageView);
    }"><pre class="notranslate"><span class="pl-k">public</span> <span class="pl-k">static</span> <span class="pl-smi">void</span> <span class="pl-s1">glideImageLoader</span>(<span class="pl-smi">Context</span> <span class="pl-s1">mContext</span>, <span class="pl-smi">String</span> <span class="pl-s1">imgUrl</span>, <span class="pl-smi">ImageView</span> <span class="pl-s1">imageView</span>) {
        <span class="pl-smi">Glide</span>.<span class="pl-en">with</span>(<span class="pl-s1">mContext</span>).<span class="pl-en">load</span>(<span class="pl-s1">imgUrl</span>)
                .<span class="pl-en">thumbnail</span>(<span class="pl-c1">0.5f</span>)
                .<span class="pl-en">crossFade</span>()
                .<span class="pl-en">diskCacheStrategy</span>(<span class="pl-smi">DiskCacheStrategy</span>.<span class="pl-c1">SOURCE</span>)
                .<span class="pl-en">into</span>(<span class="pl-s1">imageView</span>);
    }</pre></div>

<p dir="auto"><strong>Layout XML</strong>:</p>
<div class="highlight highlight-text-xml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;android.support.v7.widget.CardView xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
    xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;
    xmlns:tools=&quot;http://schemas.android.com/tools&quot;
    android:layout_width=&quot;wrap_content&quot;
    android:layout_height=&quot;wrap_content&quot;
    android:layout_marginBottom=&quot;@dimen/dp_15&quot;
    android:layout_marginTop=&quot;@dimen/dp_5&quot;
    android:orientation=&quot;vertical&quot;
    app:cardBackgroundColor=&quot;@color/colorPrimary&quot;
    app:cardCornerRadius=&quot;@dimen/dp_5&quot;&gt;

    &lt;LinearLayout
        android:layout_width=&quot;match_parent&quot;
        android:layout_height=&quot;wrap_content&quot;
        android:orientation=&quot;vertical&quot;&gt;

        &lt;LinearLayout
            android:layout_width=&quot;wrap_content&quot;
            android:layout_height=&quot;wrap_content&quot;
            android:background=&quot;@color/f9f9f9&quot;
            android:gravity=&quot;center&quot;&gt;

            &lt;ImageView
                android:id=&quot;@id/thumbnail&quot;
                android:layout_width=&quot;@dimen/dp_160&quot;
                android:layout_height=&quot;@dimen/dp_160&quot;
                android:layout_marginLeft=&quot;@dimen/dp_50&quot;
                android:layout_marginRight=&quot;@dimen/dp_50&quot;
                tools:ignore=&quot;ContentDescription&quot; /&gt;

        &lt;/LinearLayout&gt;

        &lt;com.teafloor.utils.TextViewSemiBold
            android:id=&quot;@id/title&quot;
            android:layout_width=&quot;match_parent&quot;
            android:layout_height=&quot;wrap_content&quot;
            android:ellipsize=&quot;end&quot;
            android:gravity=&quot;center|start&quot;
            android:maxLines=&quot;1&quot;
            android:minLines=&quot;1&quot;
            android:paddingLeft=&quot;@dimen/dp_15&quot;
            android:paddingRight=&quot;@dimen/dp_15&quot;
            android:textColor=&quot;@color/blackShade&quot;
            android:textSize=&quot;@dimen/sp_15&quot; /&gt;

        &lt;com.teafloor.utils.TextViewRegular
            android:id=&quot;@id/description&quot;
            android:layout_width=&quot;match_parent&quot;
            android:layout_height=&quot;wrap_content&quot;
            android:ellipsize=&quot;end&quot;
            android:gravity=&quot;center|start&quot;
            android:lineSpacingMultiplier=&quot;1.1&quot;
            android:maxLines=&quot;2&quot;
            android:minLines=&quot;2&quot;
            android:paddingBottom=&quot;@dimen/dp_15&quot;
            android:paddingLeft=&quot;@dimen/dp_15&quot;
            android:paddingRight=&quot;@dimen/dp_15&quot;
            android:textColor=&quot;@color/blackShade&quot;
            android:textSize=&quot;@dimen/sp_13&quot; /&gt;

    &lt;/LinearLayout&gt;


&lt;/android.support.v7.widget.CardView&gt;"><pre class="notranslate">&lt;?<span class="pl-ent">xml</span><span class="pl-e"> version</span>=<span class="pl-s"><span class="pl-pds">"</span>1.0<span class="pl-pds">"</span></span><span class="pl-e"> encoding</span>=<span class="pl-s"><span class="pl-pds">"</span>utf-8<span class="pl-pds">"</span></span>?&gt;
&lt;<span class="pl-ent">android</span>.support.v7.widget.CardView <span class="pl-e">xmlns</span><span class="pl-e">:</span><span class="pl-e">android</span>=<span class="pl-s"><span class="pl-pds">"</span>http://schemas.android.com/apk/res/android<span class="pl-pds">"</span></span>
    <span class="pl-e">xmlns</span><span class="pl-e">:</span><span class="pl-e">app</span>=<span class="pl-s"><span class="pl-pds">"</span>http://schemas.android.com/apk/res-auto<span class="pl-pds">"</span></span>
    <span class="pl-e">xmlns</span><span class="pl-e">:</span><span class="pl-e">tools</span>=<span class="pl-s"><span class="pl-pds">"</span>http://schemas.android.com/tools<span class="pl-pds">"</span></span>
    <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_width</span>=<span class="pl-s"><span class="pl-pds">"</span>wrap_content<span class="pl-pds">"</span></span>
    <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_height</span>=<span class="pl-s"><span class="pl-pds">"</span>wrap_content<span class="pl-pds">"</span></span>
    <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_marginBottom</span>=<span class="pl-s"><span class="pl-pds">"</span>@dimen/dp_15<span class="pl-pds">"</span></span>
    <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_marginTop</span>=<span class="pl-s"><span class="pl-pds">"</span>@dimen/dp_5<span class="pl-pds">"</span></span>
    <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">orientation</span>=<span class="pl-s"><span class="pl-pds">"</span>vertical<span class="pl-pds">"</span></span>
    <span class="pl-e">app</span><span class="pl-e">:</span><span class="pl-e">cardBackgroundColor</span>=<span class="pl-s"><span class="pl-pds">"</span>@color/colorPrimary<span class="pl-pds">"</span></span>
    <span class="pl-e">app</span><span class="pl-e">:</span><span class="pl-e">cardCornerRadius</span>=<span class="pl-s"><span class="pl-pds">"</span>@dimen/dp_5<span class="pl-pds">"</span></span>&gt;

    &lt;<span class="pl-ent">LinearLayout</span>
        <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_width</span>=<span class="pl-s"><span class="pl-pds">"</span>match_parent<span class="pl-pds">"</span></span>
        <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_height</span>=<span class="pl-s"><span class="pl-pds">"</span>wrap_content<span class="pl-pds">"</span></span>
        <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">orientation</span>=<span class="pl-s"><span class="pl-pds">"</span>vertical<span class="pl-pds">"</span></span>&gt;

        &lt;<span class="pl-ent">LinearLayout</span>
            <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_width</span>=<span class="pl-s"><span class="pl-pds">"</span>wrap_content<span class="pl-pds">"</span></span>
            <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_height</span>=<span class="pl-s"><span class="pl-pds">"</span>wrap_content<span class="pl-pds">"</span></span>
            <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">background</span>=<span class="pl-s"><span class="pl-pds">"</span>@color/f9f9f9<span class="pl-pds">"</span></span>
            <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">gravity</span>=<span class="pl-s"><span class="pl-pds">"</span>center<span class="pl-pds">"</span></span>&gt;

            &lt;<span class="pl-ent">ImageView</span>
                <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">id</span>=<span class="pl-s"><span class="pl-pds">"</span>@id/thumbnail<span class="pl-pds">"</span></span>
                <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_width</span>=<span class="pl-s"><span class="pl-pds">"</span>@dimen/dp_160<span class="pl-pds">"</span></span>
                <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_height</span>=<span class="pl-s"><span class="pl-pds">"</span>@dimen/dp_160<span class="pl-pds">"</span></span>
                <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_marginLeft</span>=<span class="pl-s"><span class="pl-pds">"</span>@dimen/dp_50<span class="pl-pds">"</span></span>
                <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_marginRight</span>=<span class="pl-s"><span class="pl-pds">"</span>@dimen/dp_50<span class="pl-pds">"</span></span>
                <span class="pl-e">tools</span><span class="pl-e">:</span><span class="pl-e">ignore</span>=<span class="pl-s"><span class="pl-pds">"</span>ContentDescription<span class="pl-pds">"</span></span> /&gt;

        &lt;/<span class="pl-ent">LinearLayout</span>&gt;

        &lt;<span class="pl-ent">com</span>.teafloor.utils.TextViewSemiBold
            <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">id</span>=<span class="pl-s"><span class="pl-pds">"</span>@id/title<span class="pl-pds">"</span></span>
            <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_width</span>=<span class="pl-s"><span class="pl-pds">"</span>match_parent<span class="pl-pds">"</span></span>
            <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_height</span>=<span class="pl-s"><span class="pl-pds">"</span>wrap_content<span class="pl-pds">"</span></span>
            <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">ellipsize</span>=<span class="pl-s"><span class="pl-pds">"</span>end<span class="pl-pds">"</span></span>
            <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">gravity</span>=<span class="pl-s"><span class="pl-pds">"</span>center|start<span class="pl-pds">"</span></span>
            <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">maxLines</span>=<span class="pl-s"><span class="pl-pds">"</span>1<span class="pl-pds">"</span></span>
            <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">minLines</span>=<span class="pl-s"><span class="pl-pds">"</span>1<span class="pl-pds">"</span></span>
            <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">paddingLeft</span>=<span class="pl-s"><span class="pl-pds">"</span>@dimen/dp_15<span class="pl-pds">"</span></span>
            <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">paddingRight</span>=<span class="pl-s"><span class="pl-pds">"</span>@dimen/dp_15<span class="pl-pds">"</span></span>
            <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">textColor</span>=<span class="pl-s"><span class="pl-pds">"</span>@color/blackShade<span class="pl-pds">"</span></span>
            <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">textSize</span>=<span class="pl-s"><span class="pl-pds">"</span>@dimen/sp_15<span class="pl-pds">"</span></span> /&gt;

        &lt;<span class="pl-ent">com</span>.teafloor.utils.TextViewRegular
            <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">id</span>=<span class="pl-s"><span class="pl-pds">"</span>@id/description<span class="pl-pds">"</span></span>
            <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_width</span>=<span class="pl-s"><span class="pl-pds">"</span>match_parent<span class="pl-pds">"</span></span>
            <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_height</span>=<span class="pl-s"><span class="pl-pds">"</span>wrap_content<span class="pl-pds">"</span></span>
            <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">ellipsize</span>=<span class="pl-s"><span class="pl-pds">"</span>end<span class="pl-pds">"</span></span>
            <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">gravity</span>=<span class="pl-s"><span class="pl-pds">"</span>center|start<span class="pl-pds">"</span></span>
            <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">lineSpacingMultiplier</span>=<span class="pl-s"><span class="pl-pds">"</span>1.1<span class="pl-pds">"</span></span>
            <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">maxLines</span>=<span class="pl-s"><span class="pl-pds">"</span>2<span class="pl-pds">"</span></span>
            <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">minLines</span>=<span class="pl-s"><span class="pl-pds">"</span>2<span class="pl-pds">"</span></span>
            <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">paddingBottom</span>=<span class="pl-s"><span class="pl-pds">"</span>@dimen/dp_15<span class="pl-pds">"</span></span>
            <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">paddingLeft</span>=<span class="pl-s"><span class="pl-pds">"</span>@dimen/dp_15<span class="pl-pds">"</span></span>
            <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">paddingRight</span>=<span class="pl-s"><span class="pl-pds">"</span>@dimen/dp_15<span class="pl-pds">"</span></span>
            <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">textColor</span>=<span class="pl-s"><span class="pl-pds">"</span>@color/blackShade<span class="pl-pds">"</span></span>
            <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">textSize</span>=<span class="pl-s"><span class="pl-pds">"</span>@dimen/sp_13<span class="pl-pds">"</span></span> /&gt;

    &lt;/<span class="pl-ent">LinearLayout</span>&gt;


&lt;/<span class="pl-ent">android</span>.support.v7.widget.CardView&gt;</pre></div>

<p dir="auto"><strong>Stack trace / LogCat</strong>:</p>
<div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="paste stack trace and/or log here"><pre class="notranslate"><span class="pl-en">paste</span> <span class="pl-en">stack</span> <span class="pl-en">trace</span> <span class="pl-k">and</span>/<span class="pl-en">or</span> <span class="pl-en">log</span> <span class="pl-en">here</span></pre></div>
<p dir="auto"><strong>Glide Version</strong>: 3.7.0</p>

<p dir="auto"><strong>Integration libraries</strong>: None</p>

<p dir="auto"><strong>Device/Android Version</strong>: All devices</p>

<p dir="auto"><strong>Issue details / Repro steps / Use case background</strong>:<br>
Glide will always cancel previous request even if the new request is same as the previous one. Use Glide in list activity where each list item has a image view. After activity created, Glide requests (Glide.with(Activity.this).load(url).into(imageView)) are triggered by ListAdapter.getView() method. Before the requests are finished, call ListAdapter.notifyDataSetChanged(). Then ListAdapter.getView() will be called again, and the same Glide requests are sent out, the previous requests are all cancelled. But the cancellation is worthless since the requests are totally the same.</p>

<p dir="auto"><strong>Glide load line / <code class="notranslate">GlideModule</code> (if any) / list Adapter code (if any)</strong>:</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// Code in Activity
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    // setup list adapter...
    // setup event listener...
}

// this method may be called after activity created immediately
protected void onEvent(Event event) {
    if (event...) {
        adapter.notifyDataSetChanged();
    }
}"><pre class="notranslate"><span class="pl-c">// Code in Activity</span>
<span class="pl-c1">@</span><span class="pl-c1">Override</span>
<span class="pl-k">protected</span> <span class="pl-smi">void</span> <span class="pl-s1">onCreate</span>(<span class="pl-smi">Bundle</span> <span class="pl-s1">savedInstanceState</span>) {
    <span class="pl-en">super</span>.<span class="pl-en">onCreate</span>(<span class="pl-s1">savedInstanceState</span>);
    <span class="pl-en">setContentView</span>(<span class="pl-smi">R</span>.<span class="pl-s1">layout</span>.<span class="pl-s1">activity_main</span>);

    <span class="pl-c">// setup list adapter...</span>
    <span class="pl-c">// setup event listener...</span>
}

<span class="pl-c">// this method may be called after activity created immediately</span>
<span class="pl-k">protected</span> <span class="pl-smi">void</span> <span class="pl-s1">onEvent</span>(<span class="pl-smi">Event</span> <span class="pl-s1">event</span>) {
    <span class="pl-k">if</span> (<span class="pl-s1">event</span>...) {
        <span class="pl-s1">adapter</span>.<span class="pl-en">notifyDataSetChanged</span>();
    }
}</pre></div>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// Code in adapter
@Override public View getView(int position, View recycled, ViewGroup container) {
  final ImageView myImageView;
  if (recycled == null) {
    myImageView = (ImageView) inflater.inflate(R.layout.my_image_view, container, false);
  } else {
    myImageView = (ImageView) recycled;
  }

  String url = myUrls.get(position);

  Glide
    .with(myFragment)
    .load(url)
    .centerCrop()
    .placeholder(R.drawable.loading_spinner)
    .crossFade()
    .into(myImageView);

  return myImageView;
}"><pre class="notranslate"><span class="pl-c">// Code in adapter</span>
<span class="pl-c1">@</span><span class="pl-c1">Override</span> <span class="pl-k">public</span> <span class="pl-smi">View</span> <span class="pl-s1">getView</span>(<span class="pl-smi">int</span> <span class="pl-s1">position</span>, <span class="pl-smi">View</span> <span class="pl-s1">recycled</span>, <span class="pl-smi">ViewGroup</span> <span class="pl-s1">container</span>) {
  <span class="pl-k">final</span> <span class="pl-smi">ImageView</span> <span class="pl-s1">myImageView</span>;
  <span class="pl-k">if</span> (<span class="pl-s1">recycled</span> == <span class="pl-c1">null</span>) {
    <span class="pl-s1">myImageView</span> = (<span class="pl-smi">ImageView</span>) <span class="pl-s1">inflater</span>.<span class="pl-en">inflate</span>(<span class="pl-smi">R</span>.<span class="pl-s1">layout</span>.<span class="pl-s1">my_image_view</span>, <span class="pl-s1">container</span>, <span class="pl-c1">false</span>);
  } <span class="pl-k">else</span> {
    <span class="pl-s1">myImageView</span> = (<span class="pl-smi">ImageView</span>) <span class="pl-s1">recycled</span>;
  }

  <span class="pl-smi">String</span> <span class="pl-s1">url</span> = <span class="pl-s1">myUrls</span>.<span class="pl-en">get</span>(<span class="pl-s1">position</span>);

  <span class="pl-smi">Glide</span>
    .<span class="pl-en">with</span>(<span class="pl-s1">myFragment</span>)
    .<span class="pl-en">load</span>(<span class="pl-s1">url</span>)
    .<span class="pl-en">centerCrop</span>()
    .<span class="pl-en">placeholder</span>(<span class="pl-smi">R</span>.<span class="pl-s1">drawable</span>.<span class="pl-s1">loading_spinner</span>)
    .<span class="pl-en">crossFade</span>()
    .<span class="pl-en">into</span>(<span class="pl-s1">myImageView</span>);

  <span class="pl-k">return</span> <span class="pl-s1">myImageView</span>;
}</pre></div>