package com.cheng.blzb.ui.fragment.merchant.detail

import android.widget.ImageView
import coil.load
import coil.transform.RoundedCornersTransformation
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.cheng.blzb.R
import com.cheng.blzb.bean.UploadFileEntity
import com.example.base.utils.DensityUtils

class MerchantGoodsImageAdapter: BaseQuickAdapter<UploadFileEntity, BaseViewHolder>(R.layout.listitem_merchant_goods_image) {
    override fun convert(holder: BaseViewHolder, item: UploadFileEntity) {
        holder.getView<ImageView>(R.id.iv_cover).load(item.url) {
            transformations(RoundedCornersTransformation(DensityUtils.dp2px(16f).toFloat()))
        }
    }
}