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

import android.support.v4.app.Fragment
import android.support.v4.app.FragmentManager
import android.support.v4.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
    }
}