Issue 1:
Glide Version: 3.8.0

Integration libraries: Volley

Device/Android Version: Motorola G4 Plus/ 7.0 , Asus P024 Tablet/ 6.0.1, Oneplus One/5.0.2,

Issue details / Repro steps / Use case background: I am loading an image with a background #f9f9f9 this image. 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.

Moto G4 Plus Android 7.0

Asus P024 Tablet Android 6.0.1

OnePlus One Android 5.0.2

The nougat device loads the image with some transparent color.

The Marshmallow device loads the image with #f7f7f7 color

The Lollipop device loads the image with #b9b9b9 color.

I have used Picasso for the same image and it loads the image perfectly.

Why is this happening?

Glide load line / GlideModule (if any) / list Adapter code (if any):

public static void glideImageLoader(Context mContext, String imgUrl, ImageView imageView) {
Glide.with(mContext).load(imgUrl)
.thumbnail(0.5f)
.crossFade()
.diskCacheStrategy(DiskCacheStrategy.SOURCE)
.into(imageView);
}

Layout XML:

<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_15"
android:layout_marginTop="@dimen/dp_5"
android:orientation="vertical"
app:cardBackgroundColor="@color/colorPrimary"
app:cardCornerRadius="@dimen/dp_5">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/f9f9f9"
android:gravity="center">

<ImageView
android:id="@id/thumbnail"
android:layout_width="@dimen/dp_160"
android:layout_height="@dimen/dp_160"
android:layout_marginLeft="@dimen/dp_50"
android:layout_marginRight="@dimen/dp_50"
tools:ignore="ContentDescription" />

</LinearLayout>

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

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

</LinearLayout>

</android.support.v7.widget.CardView>

Stack trace / LogCat:

paste stack trace and/or log here

Issue 2:
Glide Version: 3.7.0

Integration libraries: None

Device/Android Version: All devices

Issue details / Repro steps / Use case background:

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.

Glide load line / GlideModule (if any) / list Adapter code (if any):

// 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();
}
}

// 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;
}