Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package southgrove.game.activities;
- import southgrove.game.R;
- import android.app.Activity;
- import android.content.Intent;
- import android.os.Bundle;
- import android.view.View;
- import android.view.View.OnClickListener;
- public class Menu extends Activity
- {
- @Override
- public void onCreate(Bundle savedInstanceState)
- {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.menu);
- View playButton = findViewById(R.id.play);
- playButton.setOnClickListener(new OnClickListener()
- {
- public void onClick(View view)
- {
- startActivityForResult(new Intent(Menu.this, Play.class), 0);
- }
- });
- View testingButton = findViewById(R.id.testing);
- testingButton.setOnClickListener(new OnClickListener()
- {
- public void onClick(View view)
- {
- startActivityForResult(new Intent(Menu.this, Testing.class), 0);
- }
- });
- View closeButton = findViewById(R.id.close);
- closeButton.setOnClickListener(new OnClickListener()
- {
- public void onClick(View view)
- {
- finish();
- }
- });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement