package com.zj365.dc.adapter

import android.widget.TextView
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.xty.base.adapter.BaseAdapter
import com.xty.network.model.FamilyBean
import com.zj365.dc.R

class FamilyAdapter(var position:Int=-1):BaseAdapter<FamilyBean>(R.layout.item_family_name) {
    override fun convert(holder: BaseViewHolder, item: FamilyBean) {
        holder.getView<TextView>(R.id.mName).isSelected = position==holder.layoutPosition
        holder.getView<TextView>(R.id.mIndiacator).isSelected = position==holder.layoutPosition
        holder.setText(R.id.mName,item.fCall).setTextColorRes(R.id.mName,if(position==holder.layoutPosition) R.color.col_02c else R.color.col_C7C)
    }
}