package com.led.scroller.barrage.banner.ui.adapter

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

class TabFragmentPagerAdapter(
    fm: FragmentManager,
    private val mFragments: List<Fragment>,
    private val mTiles: List<String>
) : FragmentStatePagerAdapter(fm) {

    override fun getCount(): Int = mFragments.size

    override fun getItem(i: Int): Fragment {
        return mFragments[i]
    }

    override fun getPageTitle(position: Int): CharSequence {
        return mTiles[position]
    }
}