package com.zj365.health.adapter

import android.widget.ImageView
import com.bumptech.glide.Glide
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.tamsiree.rxkit.RxTimeTool
import com.xty.base.adapter.BaseAdapter
import com.xty.common.getImageUrl
import com.xty.common.setImage
import com.xty.common.setRoundImage
import com.zj365.health.R
import com.xty.network.model.AnswerBean


class PictureShowAdapter : BaseAdapter<String>(R.layout.item_picture) {
    override fun convert(holder: BaseViewHolder, item: String) {
        holder.setGone(R.id.ivDelete,true)
        if (item.isEmpty()){
            holder.itemView.findViewById<ImageView>(R.id.ivImage).setImageResource(R.mipmap.changctup)
        } else {
            holder.getView<ImageView>(R.id.ivImage)
                .apply {
                    setRoundImage(context, item)
                }
        }
    }
}