package com.dskj.trustlend.utils;

/**
 * **********************
 *
 * @Author bug machine
 * 创建时间： 2025/5/20 17:32
 * 用途
 * **********************
 */
import static com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions.withCrossFade;

import android.content.Context;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.bumptech.glide.annotation.GlideModule;
import com.bumptech.glide.module.AppGlideModule;
import com.bumptech.glide.request.RequestListener;
import com.bumptech.glide.request.RequestOptions;
import com.dskj.trustlend.model.AdBean;

/**
 * Created by Meiji on 2017/5/31.
 */
@GlideModule
public class ImageLoader extends AppGlideModule {

    /**
     * 带加载异常图片
     */
    public static void loadCenterCropBanner(Context context, AdBean url, ImageView view, int defaultResId, int errorResId) {

        Glide.with(context).load(url.getImgUrl()).placeholder(defaultResId).error(errorResId).into(view);

    }

}


