package com.tenlionsoft.oamodule.adapter;

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

import com.tenlionsoft.baselib.core.widget.base.BaseRecyclerAdapter;
import com.tenlionsoft.oamodule.R;
import com.tenlionsoft.oamodule.beans.MeetingRoomRecordBean;
import com.tenlionsoft.oamodule.holder.MeetingRoomRecordHolder;

import java.util.List;

/**
 * 作者: adam
 * 日期: 2022/4/14 - 15:20
 * 邮箱: itgaojian@163.com
 * 描述:
 */
public class MeetingMineApplyAdapter extends BaseRecyclerAdapter<MeetingRoomRecordBean, MeetingRoomRecordHolder> {
    public MeetingMineApplyAdapter(Context ctx, List<MeetingRoomRecordBean> list) {
        super(ctx, list);
    }

    @Override
    public MeetingRoomRecordHolder createHolder(ViewGroup parent, int viewType) {
        View itemView = LayoutInflater.from(mContext).inflate(R.layout.item_meeting_room_record, parent, false);
        return new MeetingRoomRecordHolder(itemView);
    }

    @Override
    public void bindHolder(MeetingRoomRecordHolder h, int i) {
        MeetingRoomRecordBean bean = mData.get(i);
        h.mTvStartTime.setText("开始时间:"+bean.getMeetingStartTime());
        h.mTvEndTime.setText("结束时间:"+bean.getMeetingEndTime());
        h.mTvName.setText("会议室:"+bean.getMeetingRoomName());
        h.mTvTitle.setText("会议标题:"+bean.getMeetingTitle());
        h.mTvEmcee.setText("主持人:"+bean.getMeetingHostUserName());
    }
}
