package com.dahe.gldriver.adapter

import android.content.Context
import android.view.ViewGroup
import android.widget.ImageView
import com.chad.library.adapter4.BaseQuickAdapter
import com.chad.library.adapter4.viewholder.QuickViewHolder
import com.dahe.gldriver.R
import com.dahe.gldriver.bean.CarBean
import com.dahe.mylibrary.utils.ImageLoader
import com.luck.picture.lib.entity.LocalMedia

/**
 * @ClassName ShowImageAdapter
 * @Author john
 * @Date 2024/3/19 08:39
 * @Description TODO
 */
class ShowImageAdapter : BaseQuickAdapter<LocalMedia, QuickViewHolder>() {
    override fun onBindViewHolder(holder: QuickViewHolder, position: Int, item: LocalMedia?) {
        val view = holder.getView<ImageView>(R.id.fiv)
        ImageLoader.getInstance().loadRoundImage(context,item?.availablePath,6,view)
    }

    override fun onCreateViewHolder(
        context: Context,
        parent: ViewGroup,
        viewType: Int
    ) = QuickViewHolder(R.layout.item_show_image, parent)
}