diff --git a/dali/src/main/java/at/favre/lib/dali/builder/blur/BlurBuilder.java b/dali/src/main/java/at/favre/lib/dali/builder/blur/BlurBuilder.java index b567f00..46e0390 100644 --- a/dali/src/main/java/at/favre/lib/dali/builder/blur/BlurBuilder.java +++ b/dali/src/main/java/at/favre/lib/dali/builder/blur/BlurBuilder.java @@ -8,6 +8,7 @@ import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; +import android.graphics.drawable.LayerDrawable; import android.graphics.drawable.TransitionDrawable; import android.os.Build; import android.os.Handler; @@ -287,8 +288,14 @@ public void run() { if (data.alphaFadeIn) { //use what is currently in the imageview to fade Drawable placeholder; - if (imageView.getDrawable() != null) { - placeholder = imageView.getDrawable(); + Drawable oldDrawable = imageView.getDrawable(); + if (oldDrawable != null) { + if (oldDrawable instanceof LayerDrawable) { + LayerDrawable oldLayerDrawable = (LayerDrawable) oldDrawable; + placeholder = oldLayerDrawable.getDrawable(0); + } else { + placeholder = imageView.getDrawable(); + } } else { placeholder = new ColorDrawable(Color.parseColor("#00FFFFFF")); }