package com.zj365.health.adapter

import android.text.Html
import android.widget.ImageView
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.xty.base.adapter.BaseAdapter
import com.xty.common.setImage
import com.zj365.health.BuildConfig
import com.zj365.health.R
import com.xty.network.model.ProgrammeBean

class ProgrammeAdapter:BaseAdapter<ProgrammeBean>(R.layout.item_programme) {
    override fun convert(holder: BaseViewHolder, item: ProgrammeBean) {
        holder.setText(R.id.programeName,item.name)
            .setText(R.id.mTime,item.createTime)
            .setText(R.id.agencyName,item.orgName)
            .setText(R.id.content,  Html.fromHtml(item.prName))
        holder.getView<ImageView>(R.id.logo).setImage(context, BuildConfig.url + item.imageUrl)
    }
}