Glide.with(context)
.asBitmap()
.load(url)
.into(new SimpleTarget<Bitmap>() {
@Override
public void onResourceReady(@NonNull Bitmap resource, @Nullable Transition<? super Bitmap> transition) {
imageView.setImageBitmap(resource);
float width = SizeUtils.dp2px(106f);
float scale = width / resource.getWidth();
int afterWidth = (int) (resource.getWidth() * scale);
int afterHeight = (int) (resource.getHeight() * scale);
ViewGroup.LayoutParams lp = imageView.getLayoutParams();
lp.width = afterWidth;
lp.height = afterHeight;
imageView.setLayoutParams(lp);
}
});