package com.example.leudaemialikeme.Adapter;

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

import com.example.leudaemialikeme.Fragment.InvitationChannelFragment;

public class InvitationPageFragmentAdapter extends FragmentPagerAdapter {
    private String[] channelList;
    private FragmentManager fm;
    public InvitationPageFragmentAdapter(@NonNull FragmentManager fm, String[] channelList) {
        super(fm);
        this.channelList = channelList;
        this.fm = fm;
    }

    @NonNull
    @Override
    public Fragment getItem(int position) {
        String InvitationCategoryTitle = channelList[position];
        return InvitationChannelFragment.newInstance(InvitationCategoryTitle);
    }

    @Override
    public int getCount() {
        return channelList.length;
    }
}
