package com.wd.workoffice.ui.adapter;

import java.util.List;

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


/**
 * Created by Flexible on 2017/4/1 0001.
 */

public class VpDataAdapter extends FragmentPagerAdapter {
    private List<Fragment> data;
    public VpDataAdapter(FragmentManager fm, List<Fragment> data) {
        super(fm,BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT);
        this.data = data;
    }

    @Override
    public Fragment getItem(int position) {
        return data.get(position);
    }

    @Override
    public int getCount() {
        return data.size();
    }
}
