-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEmployee.java
More file actions
39 lines (36 loc) · 1.37 KB
/
Employee.java
File metadata and controls
39 lines (36 loc) · 1.37 KB
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
package com.example.lenovo.employeetrackingsystem;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
public class Employee extends AppCompatActivity {
private Button viewtasks,ongoingtask;
private TextView name;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_employee);
Bundle extras = getIntent().getExtras();
String hname = extras.getString("Name");
viewtasks = (Button) findViewById(R.id.viewtask);
ongoingtask = (Button) findViewById(R.id.ontask);
name = (TextView) findViewById(R.id.name);
name.setText("Hi " +hname);
viewtasks.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent viewtask = new Intent(Employee.this, ViewTask.class);
startActivity(viewtask);
}
});
ongoingtask.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent ontask = new Intent(Employee.this, TaskDetails.class);
startActivity(ontask);
}
});
}
}