package com.convenient.android.lib.ui.sample.ad.util

import android.content.Context
import android.view.View
import androidx.appcompat.widget.AppCompatImageView
import coil.Coil
import coil.load
import com.composition.android.lib.ad.interfaces.ImageLoader

/**
 * @classname:
 * @author: LiuXiaoLong
 * @date: 2022/9/7
 * description:
 */
class CoilImageLoader : ImageLoader<AppCompatImageView> {

    override fun displayImage(context: Context?, path: Any?, imageView: AppCompatImageView) {
        imageView.load(path)
    }

    override fun createImageView(context: Context?): AppCompatImageView {
        return AppCompatImageView(context!!)
    }
}