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.beans.MineJoinMeetingListBean;
import com.tenlionsoft.oamodule.holder.MeetingRoomRecordHolder;

import java.util.List;

/**
 * 作者: adam
 * 日期: 2022/4/14 - 15:20
 * 邮箱: itgaojian@163.com
 * 描述:
 */
public class MeetingMineJoinEmceeAdapter extends BaseRecyclerAdapter<MineJoinMeetingListBean.RowsBean, MeetingRoomRecordHolder> {
    public MeetingMineJoinEmceeAdapter(Context ctx, List<MineJoinMeetingListBean.RowsBean> 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) {
        MineJoinMeetingListBean.RowsBean bean = mData.get(i);
        h.mTvStartTime.setText("开始时间:"+bean.getMeetingDTO().getMeetingStartTime());
        h.mTvEndTime.setText("结束时间:"+bean.getMeetingDTO().getMeetingEndTime());
        h.mTvName.setText("会议室:"+bean.getMeetingDTO().getMeetingRoomName());
        h.mTvTitle.setText("会议标题:"+bean.getMeetingDTO().getMeetingTitle());
        h.mTvEmcee.setText("主持人:"+bean.getMeetingDTO().getMeetingHostUserName());
    }
}
