package com.exquisite.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 androidx.recyclerview.widget.RecyclerView;

import com.exquisite.KeyboardSkin;
import com.exquisite.adapter.ThumAdapter;
import com.exquisite.R;
import com.exquisite.tools.SpaceItem;

public class FragmentLove extends Fragment {
    private RecyclerView recyclerView;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_foryou, container, false);

        recyclerView = view.findViewById(R.id.keyboard_rv);
        SpaceItem spaceItem = new SpaceItem(10, 20, 10);
        recyclerView.setAdapter(new ThumAdapter(requireContext(), KeyboardSkin.getMyDataArrayList()));
        recyclerView.setLayoutManager(new GridLayoutManager(requireContext(), 2));
        recyclerView.addItemDecoration(spaceItem);


        return view;
    }
}