package kr.co.zumo.app.lifeplus.activity;

import android.os.Bundle;
import android.support.design.widget.TabLayout;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;

import kr.co.zumo.app.R;
import kr.co.zumo.app.lifeplus.view.fragment.faq.FAQPagerAdapter;

public class FAQActivity extends AppCompatActivity {

  private TabLayout tabLayoutFaq;
  private ViewPager viewPagerFaq;
  private FAQPagerAdapter faqPagerAdapter;

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_faq);

    tabLayoutFaq = findViewById(R.id.faq_tab_layout);
    viewPagerFaq = findViewById(R.id.faq_view_pager);
    tabLayoutFaq.setTabGravity(TabLayout.GRAVITY_FILL);

    String[] tab = {"전체", "회원", "혜택", "기타"};
    faqPagerAdapter = new FAQPagerAdapter(getSupportFragmentManager(), tab);
    tabLayoutFaq.setupWithViewPager(viewPagerFaq, true);
    viewPagerFaq.setAdapter(faqPagerAdapter);
  }
}
