package com.prankster.fx.ui.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.GridLayoutManager;

import com.prankster.fx.FXApp;
import com.prankster.fx.ui.adapter.HomeAdapter;
import com.prankster.fx.databinding.FgHomeBinding;


public class FXHomeFg extends Fragment {


    private FgHomeBinding binding;

    public FXHomeFg() {
    }

    @SuppressWarnings("unused")
    public static FXHomeFg newInstance() {
        FXHomeFg fragment = new FXHomeFg();
        Bundle args = new Bundle();
        fragment.setArguments(args);
        return fragment;
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        binding = FgHomeBinding.inflate(inflater);
        binding.recyclerView.setLayoutManager(new GridLayoutManager(requireContext(), 2));
        binding.recyclerView.setAdapter(new HomeAdapter(requireActivity(), FXApp.bean));

        return binding.getRoot();
    }


}