直播间聊天列表展示不全问题修复
This commit is contained in:
parent
fc0c734261
commit
c95fd2d49c
@ -4,6 +4,7 @@ import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.net.Uri;
|
||||
import android.text.TextUtils;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@ -12,7 +13,6 @@ import androidx.annotation.Nullable;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import com.bumptech.glide.request.target.CustomTarget;
|
||||
import com.bumptech.glide.request.target.SimpleTarget;
|
||||
import com.bumptech.glide.request.transition.Transition;
|
||||
import com.yunbao.common.R;
|
||||
|
||||
@ -127,8 +127,13 @@ public class ImgLoader {
|
||||
|
||||
public static void displayDrawable(Context context, String url, final DrawableCallback callback) {
|
||||
if (!contextIsExist(context)) {
|
||||
|
||||
return;
|
||||
}
|
||||
if (TextUtils.isEmpty(url)) {
|
||||
if (callback != null)
|
||||
callback.onLoadFailed();
|
||||
} else {
|
||||
Glide.with(context).asDrawable().load(url).skipMemoryCache(SKIP_MEMORY_CACHE).into(new CustomTarget<Drawable>() {
|
||||
|
||||
@Override
|
||||
@ -144,6 +149,10 @@ public class ImgLoader {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static void displayFileDrawable(Context context, File file, final DrawableCallback callback) {
|
||||
if (!contextIsExist(context)) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user