-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathteacher.java
50 lines (41 loc) · 1.25 KB
/
teacher.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
package com.example.student;
import androidx.appcompat.app.AppCompatActivity;
import android.graphics.Paint;
import android.os.Bundle;
import android.view.View;
import android.content.Intent;
import android.widget.Button;
import android.widget.TextView;
public class teacher extends AppCompatActivity {
private Button student;
private Button teacher;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_teacher);
student=findViewById(R.id.student);
teacher=findViewById(R.id.teacher);
student.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
openregs();
}
});
teacher.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
openregt();
}
});
}
public void openregs(){
finish();
Intent intent = new Intent(teacher.this,regs.class);
startActivity(intent);
}
public void openregt(){
finish();
Intent intent = new Intent(teacher.this,regt.class);
startActivity(intent);
}
}