package com.audio.record.screen.test.adapter

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity
import androidx.viewpager2.adapter.FragmentStateAdapter
import com.audio.record.screen.test.fragment.MainFragment
import com.audio.record.screen.test.fragment.RecordMainFragment


class ViewPager2Adapter(fragmentActivity: FragmentActivity) :
    FragmentStateAdapter(fragmentActivity) {
    private val fragments: List<Fragment> = arrayListOf(
        MainFragment.newInstance(),
        RecordMainFragment.newInstance()
    )
    override fun getItemCount(): Int = fragments.size

    override fun createFragment(position: Int): Fragment = fragments[position]
}