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

public class FramerateAdapter extends CommonAdapter<FramerateBean> {
    public String TAG= FramerateAdapter.class.getSimpleName();
    private Context context;
    private MainActivity mMainActivity;
    public List<FramerateBean> FramerateBeanList;

    public FramerateAdapter(Context context, MainActivity mMainActivity, int layoutId, List<FramerateBean> FramerateBeanList) {
        super(context, layoutId, FramerateBeanList);
        this.context = context;
        this.mMainActivity=mMainActivity;
        this.FramerateBeanList=FramerateBeanList;
    }

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

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