-
Notifications
You must be signed in to change notification settings - Fork 0
/
ChooseActivity.java
45 lines (39 loc) · 1.4 KB
/
ChooseActivity.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
//Nayan Pasari
//ID: 111868106
package com.example.hackmatcher;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
/*
A screen that allows to choose between different activities to look to.
*/
public class ChooseActivity extends AppCompatActivity {
private Button meet;
private Button help;
/*
onCreate: Displays whatever is included on the screen at build.
*/
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_choose);
meet = findViewById(R.id.buttonmeet);
help = findViewById(R.id.buttonhelp);
meet.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent open = new Intent(ChooseActivity.this, HomeActivity.class); //helps to open a new screen/intent
startActivity(open);
}
});
help.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent helpreq = new Intent(ChooseActivity.this, HelpActivity.class); //helps to open a new screen/intent
startActivity(helpreq);
}
});
}
}