-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGameActivity.java
More file actions
49 lines (44 loc) · 1.54 KB
/
GameActivity.java
File metadata and controls
49 lines (44 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package com.example.findme_technovation;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class GameActivity extends MainActivity {
Button home;
Button tic;
Button memory;
Button colors;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.game);
home = findViewById(R.id.homeButtonG);
colors = findViewById(R.id.colorsButton);
memory = findViewById(R.id.memoryButton);
tic = findViewById(R.id.ticButton); // Initialize tic button
home.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(GameActivity.this, MainActivity.class));
}
});
colors.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(GameActivity.this, colors.class));
}
});
memory.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(GameActivity.this, memory.class));
}
});
tic.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(GameActivity.this, tictactoe.class));
}
});
}
}