package com.zj365.mime.adapter

import android.widget.LinearLayout
import androidx.constraintlayout.widget.ConstraintLayout
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.ruffian.library.widget.RImageView
import com.xty.base.adapter.BaseAdapter
import com.xty.common.setImage
import com.xty.network.model.EnterpriseInfoHomeBean
import com.zj365.mime.R

class EnterpriseInformationChildAdapter (var type : Int = 0): BaseAdapter<EnterpriseInfoHomeBean.EnterpriseInfoChildBean>(R.layout.item_enterprise_info_child) {
    override fun convert(holder: BaseViewHolder, item: EnterpriseInfoHomeBean.EnterpriseInfoChildBean) {
        if (type != 0){
            holder.getView<ConstraintLayout>(R.id.root).setPadding(16,28,16,20)
        }
        holder.setText(R.id.tv_info_title,item.title)
        holder.setText(R.id.mTime,item.createTime)
        holder.getView<RImageView>(R.id.img_cover).setImage(context,item.pic)

    }
}