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

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.liaochang_adapter;
import com.bonait.bnframework.modules.home.adapter.newgood_adapter;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import java.util.List;


public class GoodRightAdapter extends BaseQuickAdapter<LinkMode, BaseViewHolder> {

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

    @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);
        newgood_adapter adapter = new newgood_adapter(getContext(), item.content);
        view.setAdapter(adapter);
    }


}