-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGame2.java
56 lines (50 loc) · 1.84 KB
/
Game2.java
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
50
51
52
53
54
55
56
package com.application.brainfit;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class Game2 extends AppCompatActivity {
Button easy, medium, hard, expert;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_game2);
easy = (Button) findViewById(R.id.easy);
medium = (Button) findViewById(R.id.medium);
hard = (Button) findViewById(R.id.hard);
expert = (Button) findViewById(R.id.expert);
easy.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent i = new Intent(getApplicationContext(), G2Easy.class);
startActivity(i);
finish();
}
});
medium.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent i = new Intent(getApplicationContext(), G2Medium.class);
startActivity(i);
finish();
}
});
hard.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent i = new Intent(getApplicationContext(), G2Hard.class);
startActivity(i);
finish();
}
});
expert.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent i = new Intent(getApplicationContext(), G2Expert.class);
startActivity(i);
finish();
}
});
}
}