package com.team.app.fragment;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.team.app.R;
import com.team.app.activities.GameDetailActivity;
import com.team.app.adapter.TeamImageAdapter;
import com.github.ybq.android.spinkit.SpinKitView;

public class TeamFragment extends Fragment {

    @Override
    public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        View inflate = layoutInflater.inflate(R.layout.fragment_team, viewGroup, false);
        SpinKitView progress = inflate.findViewById(R.id.progress);
        RecyclerView recyclerView = inflate.findViewById(R.id.recyclerView);
        recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
        TeamImageAdapter adapter = new TeamImageAdapter(getContext(), GameDetailActivity.cricket, progress);
        recyclerView.setAdapter(adapter);
        return inflate;
    }
}
