package com.yidianling.uikit.business.session.view.question;


import android.widget.TextView;

import androidx.annotation.Nullable;
import androidx.core.content.ContextCompat;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.yidianling.im.R;
import com.yidianling.uikit.custom.http.response.question.OptionsBean;

import java.util.List;

public class QuestionOneCheckAdapter extends BaseQuickAdapter<OptionsBean, BaseViewHolder> {

    public QuestionOneCheckAdapter(@Nullable List<OptionsBean> data) {
        super(R.layout.left_one_check_layout_item,data);
    }

    @Override
    protected void convert(BaseViewHolder helper, OptionsBean item) {
       TextView tv_which_question= helper.getView(R.id.tv_which_question);
        tv_which_question.setText(item.name);
       if (item.check){
           tv_which_question.setBackground(ContextCompat.getDrawable(mContext, R.drawable.im_background_18dp_1da1f2));
           tv_which_question.setTextColor(ContextCompat.getColor(mContext, R.color.white));
       }else {
           tv_which_question.setBackground(ContextCompat.getDrawable(mContext, R.drawable.im_background_18dp_e8f5fe));
           tv_which_question.setTextColor(ContextCompat.getColor(mContext, R.color.platform_color_1DA1F2));
       }

    }

}
