package com.yyrh.ui.fragment;


import android.app.Fragment;
import android.content.Context;



public class FragmentUtils {

    public static final int SDK_REGISTER_TAG = 1;
    public static final int SDK_LOGIN_TAG = 2;
    public static final int SDK_PHONE_REGISTER_TAG = 3;
    public static final int SDK_USER_SWITCH_ACCOUNT = 4;
    public static final int SDK_PHONE_SET_LOGIN_PWD_TAG = 5;
    public static final int SDK_RETRIEVE_PWD_TAG = 6;





    public static Fragment getSdkFragment(Context context, int type){
        switch (type) {
            case SDK_REGISTER_TAG:
                return UserRegisterFragment.instantiate(context,UserRegisterFragment.class.getName());
            case SDK_RETRIEVE_PWD_TAG:
                return UserRegisterFragment.instantiate(context,UserRetrievePwdFragment.class.getName());
            case SDK_PHONE_REGISTER_TAG:
                return UserRegisterFragment.instantiate(context,UserPhoneLoginFragment.class.getName());
            case SDK_LOGIN_TAG:
                return UserRegisterFragment.instantiate(context,UserAccountLoginFragment.class.getName());
            case SDK_USER_SWITCH_ACCOUNT:
                return UserRegisterFragment.instantiate(context,UserSwitchAccountLoginFragment.class.getName());
            case SDK_PHONE_SET_LOGIN_PWD_TAG:
                return UserRegisterFragment.instantiate(context,UserPhoneLoginSetpwdFragment.class.getName());
                default:
                return null;

        }
    }

}