package org.keyscience.fragments;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import org.keyscience.R;
import org.keyscience.adapters.LectureSeriesAdapter;
import org.keyscience.adapters.OurBiomesAdapter;
import org.keyscience.models.LectureSeriesModel;
import org.keyscience.models.OurBiomesModel;

public class OurBiomesFragment extends Fragment {
    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable final Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.ourbiomes_fragment, container, false);

        // setup recycler view
        RecyclerView recyclerView = view.findViewById(R.id.our_biomes_recycler);
        recyclerView.setFocusable(false);
        OurBiomesAdapter adapter = new OurBiomesAdapter(OurBiomesModel.getData(getContext()), getContext());
        recyclerView.setAdapter(adapter);
        LinearLayoutManager linearVertical = new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false);
        recyclerView.setLayoutManager(linearVertical);

        return view;
    }
}
