-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rules.java
40 lines (32 loc) · 1.16 KB
/
Rules.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
package com.example.card_quiz_game_rafael_hidalgo;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class Rules extends AppCompatActivity {
//Simple Rules Page
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_rules);
Button btnPlay = (Button) findViewById(R.id.chipPlay2);
Button btnHomePage = (Button) findViewById(R.id.chipHomePage);
btnPlay.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Rules.this,QuizActivity.class );
startActivity(intent);
finish();
}
});
btnHomePage.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Rules.this,MainActivity.class );
startActivity(intent);
finish();
}
});
}
}