package com.zj365.health.adapter

import android.graphics.Bitmap
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.xty.base.adapter.BaseAdapter
import com.xty.common.weight.CardiographView
import com.zj365.health.R

class XdAdapter : BaseAdapter<Bitmap>(R.layout.item_xd) {
    override fun convert(holder: BaseViewHolder, item:Bitmap) {
       /* var cardiographView = holder.getView<CardiographView>(R.id.cardiographView)
        var index = 0
        item.forEach { v ->
            if (index % 3 == 0) {
                val value = v.toInt() / 40
                cardiographView!!.plist.add(if (value > 500) 500 else value)
            }
            index++
        }
        cardiographView!!.invalidate()*/
        holder.setImageBitmap(R.id.mSrc,item)

    }
}