package com.rehome.meetingbook.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.ViewGroup;

import com.rehome.meetingbook.bean.YunQingExalBean;
import com.rehome.meetingbook.databinding.AdapterAppointmentDateBinding;
import com.rehome.meetingbook.databinding.AdapterYunQingExamBinding;

import java.util.List;

/**
 * Create By HuangWenFei
 * 创建日期：2022-12-21 11:11
 * 描述：
 */
public class YunQingExalAdapter  extends MyAdapter<AdapterYunQingExamBinding>{
    private List<YunQingExalBean.RowsBean> datas;

    public YunQingExalAdapter(Context context, List<YunQingExalBean.RowsBean> datas) {
        super(context);
        this.datas=datas;
    }

    @Override
    protected void handleData(int position, AdapterYunQingExamBinding binding) {
        YunQingExalBean.RowsBean item = datas.get(position);
        binding.tvDesc.setText(item.getTimes()+" 至 "+item.getTimee()+"，"+item.getDepartment_name());
    }

    @Override
    protected AdapterYunQingExamBinding getBinding(LayoutInflater inflater, ViewGroup parent) {
        return AdapterYunQingExamBinding.inflate(inflater, parent, false);
    }

    @Override
    public int getCount() {
        return datas.size();
    }

    @Override
    public Object getItem(int position) {
        return datas.get(position);
    }

    @Override
    public long getItemId(int position) {
        return position;
    }
}
