package com.gh.gamecenter.qa.answer.detail

import androidx.fragment.app.FragmentManager

class AnswerDetailFragmentStatePagerAdapter(
    fm: FragmentManager,
    private val mCreateNewAnswerDetailFragment: (answerId: String, position: Int) -> AnswerDetailFragment
) : androidx.fragment.app.FragmentStatePagerAdapter(fm) {

    var answerIdList = arrayListOf<String>()

    override fun getItem(position: Int): androidx.fragment.app.Fragment {
        return mCreateNewAnswerDetailFragment.invoke(answerIdList[position], position)
    }

    override fun getCount(): Int {
        return answerIdList.size
    }

}