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

import androidx.fragment.app.Fragment
import androidx.viewpager2.adapter.FragmentStateAdapter
import com.audio.record.screen.test.fragment.child.ImageFragment
import com.audio.record.screen.test.fragment.child.VideoFragment


class VpFragmentAdapter(mFragment: Fragment) :
    FragmentStateAdapter(mFragment) {

    val fragments: List<Fragment> = arrayListOf(
        VideoFragment.newInstance(),
        ImageFragment.newInstance()
    )

    override fun getItemCount(): Int = fragments.size

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