package com.key.coolkeyboard.adapter;

import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentStatePagerAdapter;

import com.key.coolkeyboard.fragment.LikeFragment;
import com.key.coolkeyboard.fragment.MainFragment;

import java.util.ArrayList;
import java.util.List;

public class PageAdapter extends FragmentStatePagerAdapter {
    private List<Fragment> fragmentList ;

    public PageAdapter(@NonNull FragmentManager fm,List<Fragment> list ) {
        super(fm);
        fragmentList = list;
    }

    @NonNull
    @Override
    public Fragment getItem(int position) {
        return fragmentList.get(position);
    }

    @Override
    public int getCount() {
        return fragmentList.size();
    }
}
