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.BaseActivity;
import com.sheep.gamegroup.view.fragment.FgtMainAudit;
import com.sheep.jiuyan.samllsheep.R;

/**
 * Created by ljy on 2018/8/16.
 */

public class ActAudit extends BaseActivity {
    Activity activity;

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

    @Override
    public void initView() {
        activity = this;

        FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
        Bundle bundle = new Bundle();
        Fragment fragment = getSupportFragmentManager().findFragmentByTag("tag");
        if(fragment == null){
            fragment = new FgtMainAudit();
            fragment.setArguments(bundle);
            transaction.add(R.id.frame_container, fragment, "tag");
            transaction.commitAllowingStateLoss();
        }else {
            fragment.setArguments(bundle);
            transaction.replace(R.id.frame_container, fragment);
            transaction.commitAllowingStateLoss();
        }


    }

    @Override
    public void initListener() {

    }

    @Override
    public void initData() {

    }
}
