package com.ntels.kneet.v3.view.things;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;

/**
 * 1. ClassName :   Things_Homehub_Guide_Adapter
 * 2. FileName  :   Things_Homehub_Guide_Adapter.java
 * 3. Package   :   com.ntels.kneet.v3.view.things
 * 4. Date      :   2016-07-16
 * 5. Author    :   aaron
 * 6. Comment   :   Initialize
 */
public class Things_Homehub_Guide_Adapter extends FragmentStatePagerAdapter {

    public Things_Homehub_Guide_Adapter(FragmentManager fm) {
        super(fm);
    }

    /**
     * Return the Fragment associated with a specified position.
     *
     * @param position
     */
    @Override
    public Fragment getItem(int position) {
        Fragment retFragment = null;
        switch (position) {
            case 0:
                retFragment = new Fragment_Things_Homehub_Guide_01();
                break;
            case 1:
                retFragment = new Fragment_Things_Homehub_Guide_02();
                break;
            case 2:
                retFragment = new Fragment_Things_Homehub_Guide_03();
                break;
        }
        return retFragment;
    }

    /**
     * Return the number of views available.
     */
    @Override
    public int getCount() {
        return 3;
    }
}
