package com.rv.home.rv.module.ui.main.home.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.rv.home.R;
import com.rv.home.rv.module.ui.main.home.bean.SelectItemBean;

/**
 * 可选随车物品
 */

public class SelectItemOptionalAdapter extends BaseQuickAdapter<SelectItemBean.DataBean, BaseViewHolder> {

    public SelectItemOptionalAdapter() {
        super(R.layout.rv_item_selectitem_optional_list);
    }

    @Override
    protected void convert(BaseViewHolder helper, final SelectItemBean.DataBean item) {
        if (item != null) {
            helper.setText(R.id.tv_article_content, item.getName());

            if (item.isSelect()){
                helper.getView(R.id.iv_select).setSelected(true);
            }else {
                helper.getView(R.id.iv_select).setSelected(false);
            }
        }
    }
}
