android:protect while glide version conflict
This commit is contained in:
parent
5053262dd5
commit
fac7f005d8
@ -140,20 +140,25 @@ public class ImageNode extends ViewNode<ImageView> {
|
|||||||
case "imageUrl":
|
case "imageUrl":
|
||||||
RequestBuilder<Drawable> requestBuilder = Glide.with(getContext())
|
RequestBuilder<Drawable> requestBuilder = Glide.with(getContext())
|
||||||
.load(prop.asString().value());
|
.load(prop.asString().value());
|
||||||
if (isBlur) {
|
try {
|
||||||
requestBuilder = requestBuilder
|
if (isBlur) {
|
||||||
.apply(RequestOptions
|
requestBuilder = requestBuilder
|
||||||
.bitmapTransform(new BlurTransformation(25, 3)));
|
.apply(RequestOptions
|
||||||
}
|
.bitmapTransform(new BlurTransformation(25, 3)));
|
||||||
Drawable placeHolderDrawable = getPlaceHolderDrawable();
|
}
|
||||||
|
Drawable placeHolderDrawable = getPlaceHolderDrawable();
|
||||||
|
|
||||||
if (placeHolderDrawable != null) {
|
if (placeHolderDrawable != null) {
|
||||||
requestBuilder = requestBuilder.apply(new RequestOptions().placeholder(placeHolderDrawable));
|
requestBuilder = requestBuilder.apply(RequestOptions.placeholderOf(placeHolderDrawable));
|
||||||
}
|
}
|
||||||
|
|
||||||
Drawable errorDrawable = getErrorDrawable();
|
Drawable errorDrawable = getErrorDrawable();
|
||||||
if (errorDrawable != null) {
|
if (errorDrawable != null) {
|
||||||
requestBuilder = requestBuilder.apply(new RequestOptions().error(errorDrawable));
|
requestBuilder = requestBuilder.apply(RequestOptions.errorOf(errorDrawable));
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
DoricLog.e("ImageNode blend error, please check the glide version");
|
||||||
}
|
}
|
||||||
|
|
||||||
requestBuilder
|
requestBuilder
|
||||||
|
Reference in New Issue
Block a user