优化直播间加载.9图改为由Glide管理Bitmap

This commit is contained in:
zlzw 2022-10-06 18:15:34 +08:00
parent f10316bf57
commit 340217e922

View File

@ -33,15 +33,13 @@ public class LoadDian9TuUtil {
}
}
Glide.with(context)
.asFile()
.asBitmap()
.load(imgUrl)
.into(new CustomTarget<File>() {
.into(new CustomTarget<Bitmap>() {
@Override
public void onResourceReady(@NonNull File resource, @Nullable Transition<? super File> transition) {
public void onResourceReady(@NonNull Bitmap resource, @Nullable Transition<? super Bitmap> transition) {
try {
FileInputStream is = new FileInputStream(resource);
setNinePathImage(context, imageView, BitmapFactory.decodeStream(is), position);
is.close();
setNinePathImage(context, imageView, resource, position);
} catch (Exception e) {
e.printStackTrace();
}