package com.wall.engine.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 InnerTabAdapter extends FragmentStateAdapter {
    public InnerTabAdapter(@NonNull FragmentActivity fragmentActivity) {
        super(fragmentActivity);
    }

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

        switch (position) {
            case 0:
                return new D4Fragment();
            case 1:
                return new LiveFragment();
            case 2:
                return new K4Fragment();
            default:
                return new D4Fragment();
        }
    }

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