feat: 联系人增加头像选择
This commit is contained in:
@@ -154,6 +154,21 @@ public class GlideUtils {
|
||||
.into(imageView);
|
||||
}
|
||||
|
||||
public static void loadImageSafe(@Nullable Context context, int id,
|
||||
@NonNull ImageView imageView,
|
||||
@DrawableRes int errorId) {
|
||||
RequestBuilder<Drawable> requestManager = getSafeRequestManager(context);
|
||||
if (requestManager == null) {
|
||||
Logger.w(TAG, "Skip loading image due to invalid context");
|
||||
return;
|
||||
}
|
||||
|
||||
requestManager
|
||||
.load(id)
|
||||
.error(errorId)
|
||||
.into(imageView);
|
||||
}
|
||||
|
||||
public static void loadImageSafe(@Nullable Context context, @Nullable String url,
|
||||
@NonNull ImageView imageView,
|
||||
Drawable drawable) {
|
||||
|
||||
Reference in New Issue
Block a user