package com.yidianling.im.ui.page.fragment.adapter

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentPagerAdapter

/**
 * Created by xj on 2019/10/14.
 */
class ChatPagerAdapter: FragmentPagerAdapter {

    private var mList: List<Fragment>? = null

    constructor(fm: FragmentManager, fragmentList: List<Fragment>) : super(fm) {
        mList = fragmentList
    }

    override fun getItem(index: Int): Fragment {
        return mList!![index]
    }

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