package com.zj365.mime.adapter

import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.xty.base.adapter.BaseAdapter
import com.xty.network.model.EnterpriseInfoHomeBean
import com.zj365.mime.R

class EnterpriseInformationAdapter : BaseAdapter<EnterpriseInfoHomeBean>(R.layout.item_enterprise_info) {

    override fun convert(holder: BaseViewHolder, item: EnterpriseInfoHomeBean) {

        holder.setText(R.id.tv_info_name,item.typeName)

        var  mAdapter = EnterpriseInformationChildAdapter(0)
        var recyclerView = holder.getView<RecyclerView>(R.id.recycler)

        recyclerView.layoutManager = LinearLayoutManager(context)
        recyclerView.adapter = mAdapter
        mAdapter.setNewInstance(item.list)


    }
}