Loading app/src/main/java/com/example/game2d/ChalkQuizPause.java 0 → 100644 +52 −0 Original line number Diff line number Diff line package com.example.game2d; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view.Window; import android.view.WindowManager; import android.widget.Button; public class ChalkQuizPause extends AppCompatActivity { private Button resumeButton; private Button exitButton; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_chalk_quiz_pause); Window window = getWindow(); window.setFlags( WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN ); resumeButton = findViewById(R.id.chalkResumeButton); exitButton = findViewById(R.id.chalkExitButton); resumeButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent resumeIntent = new Intent(ChalkQuizPause.this, ChalkActivity.class); resumeIntent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); startActivity(resumeIntent); } }); exitButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent exitIntent = new Intent(ChalkQuizPause.this, MainActivity.class); startActivity(exitIntent); } }); } } No newline at end of file Loading
app/src/main/java/com/example/game2d/ChalkQuizPause.java 0 → 100644 +52 −0 Original line number Diff line number Diff line package com.example.game2d; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view.Window; import android.view.WindowManager; import android.widget.Button; public class ChalkQuizPause extends AppCompatActivity { private Button resumeButton; private Button exitButton; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_chalk_quiz_pause); Window window = getWindow(); window.setFlags( WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN ); resumeButton = findViewById(R.id.chalkResumeButton); exitButton = findViewById(R.id.chalkExitButton); resumeButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent resumeIntent = new Intent(ChalkQuizPause.this, ChalkActivity.class); resumeIntent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); startActivity(resumeIntent); } }); exitButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent exitIntent = new Intent(ChalkQuizPause.this, MainActivity.class); startActivity(exitIntent); } }); } } No newline at end of file