-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainActivity.java
55 lines (46 loc) · 2.06 KB
/
MainActivity.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
package com.example.funmathv2;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Button buttonAddition = (Button) findViewById(R.id.buttonAddition);
buttonAddition.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent startAdditionMenu = new Intent(getApplicationContext(), AdditionMenu.class);
startActivity(startAdditionMenu);
}
});
Button buttonSubtraction = (Button) findViewById(R.id.buttonSubtraction);
buttonSubtraction.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent startSubtractionMenu = new Intent(getApplicationContext(), SubtractionMenu.class);
startActivity(startSubtractionMenu);
}
});
Button buttonMultiplication = (Button) findViewById(R.id.buttonMultiplication);
buttonMultiplication.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent startMultiplicationMenu = new Intent(getApplicationContext(), MultiplicationMenu.class);
startActivity(startMultiplicationMenu);
}
});
Button buttonDivision = (Button) findViewById(R.id.buttonDivision);
buttonDivision.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent startDivisionMenu = new Intent(getApplicationContext(), DivisionMenu.class);
startActivity(startDivisionMenu);
}
});
}
}