package com.xugame.gameconsole;

import android.app.Activity;
import android.app.NativeActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.RelativeLayout;

import androidx.annotation.Nullable;

import com.xugame.Test3Activity;
import com.xugame.gameconsole.util.DebugUtil;

public class Test2Activity extends NativeActivity {
    RelativeLayout layout;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        layout=new RelativeLayout(this);
        setContentView(layout);
        DebugUtil.i("EMULATORTAG","Copy ac onCreate");
        layout.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent(Test2Activity.this, Test3Activity.class);
                intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP|Intent.FLAG_ACTIVITY_NEW_TASK);
                startActivity(intent);
            }
        });
    }


    @Override
    protected void onResume() {
        DebugUtil.i("EMULATORTAG","第2 onResume");
        super.onResume();
    }

    @Override
    protected void onPause() {
        DebugUtil.i("EMULATORTAG","第2 onPause");
        super.onPause();
    }

    @Override
    protected void onStop() {
        DebugUtil.i("EMULATORTAG","第2 onStop");
        super.onStop();
    }

    @Override
    protected void onDestroy() {
        DebugUtil.i("EMULATORTAG","第2 onDestroy");
        super.onDestroy();
    }
}
