package com.wall.exquisite.wallpaper;

import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.viewpager2.adapter.FragmentStateAdapter;

// 内层 4D/LIVE/4K 适配器
public class Inner_TabAdapter extends FragmentStateAdapter {
    public Inner_TabAdapter(@NonNull FragmentActivity fragmentActivity) {
        super(fragmentActivity);
    }

    @NonNull
    @Override
    public Fragment createFragment(int position) {

        switch (position) {
            case 0:
                return new AnimalsFragment();
            case 1:
                return new PatternsFragment();
            case 2:
                return new NatureFragment();
            default:
                return new AnimalsFragment();
        }
    }

    @Override
    public int getItemCount() {
        return 3;
    }
}