package com.zj365.health.adapter

import android.widget.TextView
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.xty.base.adapter.BaseAdapter
import com.zj365.health.R

class WeekAdapter(var position:Int=0,var isWeek:Boolean=false): BaseAdapter<String>(R.layout.item_dialog_week) {
    override fun convert(holder: BaseViewHolder, item: String) {
        if(isWeek){
            holder.setText(R.id.mWeek,item)
        }else{
            holder.setText(R.id.mDay,item)
            holder.getView<TextView>(R.id.mDay).isSelected=position==holder.layoutPosition
        }

    }
}