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.APNChannelFragment;

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

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

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