You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.1 KiB
37 lines
1.1 KiB
package com.example;
|
|
|
|
import androidx.appcompat.app.AppCompatActivity;
|
|
|
|
import android.content.Intent;
|
|
import android.os.Bundle;
|
|
import android.view.View;
|
|
import android.widget.Button;
|
|
|
|
public class MainActivity extends AppCompatActivity {
|
|
|
|
Button student,teacher;
|
|
@Override
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
super.onCreate(savedInstanceState);
|
|
setContentView(R.layout.activity_main);
|
|
student = (Button) findViewById(R.id.student_button);
|
|
teacher = (Button) findViewById(R.id.teacher_button);
|
|
choose();
|
|
}
|
|
private void choose(){
|
|
student.setOnClickListener(new View.OnClickListener() {
|
|
@Override
|
|
public void onClick(View view) {
|
|
Intent intent = new Intent(MainActivity.this,StudentLogin.class);
|
|
startActivity(intent);
|
|
}
|
|
});
|
|
teacher.setOnClickListener(new View.OnClickListener() {
|
|
@Override
|
|
public void onClick(View view) {
|
|
Intent intent = new Intent(MainActivity.this, TeacherLogin.class);
|
|
startActivity(intent);
|
|
}
|
|
});
|
|
}
|
|
} |