package com.dbs.mplus.knuh.adapter;

import java.util.ArrayList;

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

public class ViewPagerAdapter extends FragmentStatePagerAdapter {

  ArrayList<Fragment> mData = new ArrayList<Fragment>();

  public ViewPagerAdapter(FragmentManager fm) {
    super(fm);
  }

  public void addItem(Fragment item) {
    mData.add(item);
  }

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

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

