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.VideocoderateBean;
import com.easygbs.easygbd.viewadapter.CommonAdapter;
import com.easygbs.easygbd.viewadapter.ViewHolder;
import java.util.List;

public class VideocoderateAdapter extends CommonAdapter<VideocoderateBean> {
    public String TAG= VideocoderateAdapter.class.getSimpleName();
    private Context context;
    private MainActivity mMainActivity;
    public List<VideocoderateBean> VideocoderateBeanList;

    public VideocoderateAdapter(Context context, MainActivity mMainActivity, int layoutId, List<VideocoderateBean> VideocoderateBeanList) {
        super(context, layoutId, VideocoderateBeanList);
        this.context = context;
        this.mMainActivity=mMainActivity;
        this.VideocoderateBeanList=VideocoderateBeanList;
    }

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

        int isst=mVideocoderateBean.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));
        }
    }
}