package com.gingersoft.gsa.cloud.main.mvp.ui.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.gingersoft.gsa.cloud.main.R;
import com.gingersoft.gsa.cloud.main.mvp.model.bean.SectionItem;

import java.util.List;

import androidx.annotation.Nullable;

/**
 * Created by Wyh on 2020/2/19.
 * 首頁點餐
 */
public class MainOrderingAdapter extends BaseQuickAdapter<SectionItem, BaseViewHolder> {
    public MainOrderingAdapter(int layoutResId, @Nullable List<SectionItem> data) {
        super(layoutResId, data);
    }

//    public MainOrderingAdapter(@Nullable List<SectionItem> data) {
//        super(R.layout.main_home_funcation_item, data);
//    }

    @Override
    protected void convert(BaseViewHolder helper, SectionItem item) {
        helper.setImageResource(R.id.iv_main_home_item_function_icon, item.getImage());
        helper.setText(R.id.tv_main_home_item_function_name, item.getText());
    }
}
