package com.kfzs.duanduan.react;

import android.support.v4.app.Fragment;

import com.kfzs.duanduan.ActMain;
import com.kfzs.duanduan.fragment.FgtMainCategory;
import com.kfzs.duanduan.fragment.FgtMainGame;
import com.kfzs.duanduan.fragment.FgtPersonalCenter;
import com.kfzs.duanduan.fragment.FgtSmallSheep;
import com.sheep.jiuyan.samllsheep.R;

/**
 * Created by realicing on 2018/1/4.
 * realicing@sina.com
 */

public enum MainTab {
    FgtSmallSheep(R.string.mine_hoggerel) {
        @Override
        public Fragment getFragment() {
            return new FgtSmallSheep();
        }
        @Override
        public int getDrawableId() {
            return R.drawable.drawable_selector_task;
        }
    },
    /*FgtMainGame(R.string.tab_viewpager_gamestore) {
        @Override
        public Fragment getFragment() {
            return new FgtMainGame();
        }

        @Override
        public int getDrawableId() {
            return R.drawable.drawable_selector_game;
        }
    },
    FgtMainCategory(R.string.tab_viewpager_classification) {
        @Override
        public Fragment getFragment() {
            return new FgtMainCategory();
        }

        @Override
        public int getDrawableId() {
            return R.drawable.drawable_selector_class;
        }
    },*/
    FgtPersonnalCenter(R.string.personal_center) {
        @Override
        public Fragment getFragment() {
            return new FgtPersonalCenter();
        }

        @Override
        public int getDrawableId() {
            return R.drawable.drawable_selector_personalcenter;
        }
    }
//    ,
    //    Bp(R.string.tab_viewpager_borrowplay) {
//        @Override
//        public Fragment getFragment() {
//            return new FgtBorrowPlay();
//        }
//
//        @Override
//        public int getDrawableId() {
//            return R.drawable.drawable_selector_bp;
//        }
//    },
    ;
    private int stringId;

    MainTab(int stringId) {
        this.stringId = stringId;
    }

    public abstract Fragment getFragment();


    public String getTabName(ActMain activity) {
        return activity.getString(this.stringId);
    }

    public int getStringId() {
        return stringId;
    }

    public abstract int getDrawableId();
}
