package com.bonait.bnframework.common.linktab.makegood;

import android.content.res.Resources;

import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.RecyclerView;

import com.bonait.bnframework.R;
import com.bonait.bnframework.common.linktab.LinkMode;
import com.bonait.bnframework.common.view.MyLayoutManager;
import com.bonait.bnframework.modules.home.adapter.newgood_adapter;
import com.bonait.bnframework.modules.home.adapter.newmakegood_adapter;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import java.util.List;

public class MakeGoodRightAdapter extends BaseQuickAdapter<LinkMode, BaseViewHolder> {

    public List<LinkMode> Fdata;
    public Resources resources;
    public MakeGoodRightAdapter(@LayoutRes int layoutResId, @Nullable List<LinkMode> data, Resources _resources) {
        super(layoutResId, data);
        resources=_resources;
        Fdata=data;
    }

    public newmakegood_adapter adapter=null;
    @Override
    protected void convert(BaseViewHolder holder, LinkMode item) {
        RecyclerView view= holder.getView(R.id.recycler_view);

        MyLayoutManager layout = new MyLayoutManager();
        layout.setAutoMeasureEnabled(true);
        view.setLayoutManager(layout);
        adapter = new newmakegood_adapter(getContext(), item.content);
        view.setAdapter(adapter);
    }
}