package com.zj365.health.adapter

import android.widget.CheckedTextView
import android.widget.TextView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.zj365.health.R
import com.xty.network.model.NSuanMessagePerfectBean

class NSuanMessagePerfectAdapter(
    layoutResId: Int,
    data: MutableList<NSuanMessagePerfectBean>
) : BaseQuickAdapter<NSuanMessagePerfectBean, BaseViewHolder>(
    layoutResId,
    data
) {
    override fun convert(holder: BaseViewHolder, item: NSuanMessagePerfectBean) {
        val mSelected = holder.getView<CheckedTextView>(R.id.mCbSelected)
        val title = holder.getView<TextView>(R.id.mTvTitle)
        val message = holder.getView<TextView>(R.id.mTvMessage)
        mSelected.isChecked = item.isSelected
        title.text = item.title
        message.text = item.message
    }
}