package kr.co.zumo.app.lifeplus.view.fragment.faq;

import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;

/**
 * FaqPagerAdapter
 * <pre>
 * </pre>
 *
 * @author 하세미
 * @version 1.0
 * @history 하세미   [2018-10-01]   [최초 작성]
 * @since 2018-10-01
 */
public class FAQPagerAdapter extends FragmentStatePagerAdapter {

  private String[] tab;
  private static final int PAGE_COUNT = 4;

  public FAQPagerAdapter(FragmentManager fm, String[] tab) {
    super(fm);
    this.tab = tab;
  }

  @Override
  public Fragment getItem(int position) {
    FAQFragment faqFragment = new FAQFragment();
    return faqFragment;
  }

  @Override
  public int getCount() {
    return PAGE_COUNT;
  }

  @Nullable
  @Override
  public CharSequence getPageTitle(int position) {
    return tab[position];
  }
}
