Advertisement
SenpaiZero

Untitled

May 9th, 2024
752
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.06 KB | None | 0 0
  1. package com.example.pairs;
  2.  
  3. import android.content.Intent;
  4. import android.os.Bundle;
  5. import android.view.View;
  6. import android.view.WindowManager;
  7. import android.widget.ImageButton;
  8.  
  9. import androidx.activity.EdgeToEdge;
  10. import androidx.appcompat.app.AppCompatActivity;
  11. import androidx.core.graphics.Insets;
  12. import androidx.core.view.ViewCompat;
  13. import androidx.core.view.WindowInsetsCompat;
  14.  
  15. public class homeScreen extends AppCompatActivity {
  16.  
  17.     ImageButton play;
  18.     @Override
  19.     protected void onCreate(Bundle savedInstanceState) {
  20.         super.onCreate(savedInstanceState);
  21.         setContentView(R.layout.activity_home_screen);
  22.         getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
  23.                 WindowManager.LayoutParams.FLAG_FULLSCREEN);
  24.         play = findViewById(R.id.playBtn);
  25.  
  26.         play.setOnClickListener(new View.OnClickListener() {
  27.             @Override
  28.             public void onClick(View v) {
  29.                 startActivity(new Intent(homeScreen.this, MainActivity.class));
  30.             }
  31.         });
  32.     }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement