package com.easygbs.easygbd.adapter;
import android.content.Context;
import android.widget.TextView;
import com.easygbs.easygbd.R;
import com.easygbs.easygbd.activity.MainActivity;
import com.easygbs.easygbd.bean.AudiocoderateBean;
import com.easygbs.easygbd.viewadapter.CommonAdapter;
import com.easygbs.easygbd.viewadapter.ViewHolder;
import java.util.List;

public class AudiocoderateAdapter extends CommonAdapter<AudiocoderateBean> {
    public String TAG= AudiocoderateAdapter.class.getSimpleName();
    private Context context;
    private MainActivity mMainActivity;
    public List<AudiocoderateBean> AudiocoderateBeanList;

    public AudiocoderateAdapter(Context context, MainActivity mMainActivity, int layoutId, List<AudiocoderateBean> AudiocoderateBeanList){
        super(context, layoutId, AudiocoderateBeanList);
        this.context = context;
        this.mMainActivity=mMainActivity;
        this.AudiocoderateBeanList=AudiocoderateBeanList;
    }

    @Override
    protected void convert(ViewHolder holder, AudiocoderateBean mAudiocoderateBean, int position) {
        TextView tvName = holder.getView(R.id.tvname);
        String name=mAudiocoderateBean.getName();
        tvName.setText(name);

        int isst=mAudiocoderateBean.getIsst();
        if(isst==0){
            tvName.setTextColor(context.getResources().getColor(R.color.color_4d4d4d));
        }else if(isst==1){
            tvName.setTextColor(context.getResources().getColor(R.color.color_01c9a7));
        }
    }
}