package com.tool.applockpro.adapter;

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

import com.tool.applockpro.fragment.AllFragment;

import java.util.List;

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

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

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

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