package com.sheep.gamegroup.view.activity;

import android.app.Activity;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction;

import com.sheep.gamegroup.absBase.BaseUMActivity;
import com.sheep.gamegroup.view.fragment.FgtAskGetMoney;
import com.sheep.gamegroup.view.fragment.FgtExchangeCMCC;
import com.sheep.jiuyan.samllsheep.R;
import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
/**
 * Created by realicing on 2018/10/12.
 * realicing@sina.com
 * 移动积分兑换
 */
public class ActExchangeCMCC extends BaseUMActivity{


    Activity activity;

    @Override
    protected int getLayoutId() {
        return R.layout.common_container_act;
    }

    @Override
    public void initView() {
        activity = this;
        TitleBarUtils.getInstance()
                .setShowOrHide(this, true)
                .setTitle(this, "兑换绵羊币")
                .setTitleFinish(activity);
        FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
        Fragment fragment = getSupportFragmentManager().findFragmentByTag("tag");
        if(fragment == null){
            fragment = new FgtExchangeCMCC();
            transaction.add(R.id.frame_container, fragment, "tag");
            transaction.commitAllowingStateLoss();
        }else {
            transaction.replace(R.id.frame_container, fragment);
            transaction.commitAllowingStateLoss();
        }
    }
}
