-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAdmin.java
More file actions
39 lines (36 loc) · 1.35 KB
/
Admin.java
File metadata and controls
39 lines (36 loc) · 1.35 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.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
public class Admin extends AppCompatActivity {
private Button assign,track;
private TextView name;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_admin);
Bundle extras = getIntent().getExtras();
String hname = extras.getString("Name");
assign = (Button) findViewById(R.id.assign);
track = (Button) findViewById(R.id.track);
name = (TextView) findViewById(R.id.name);
name.setText("Hi " +hname);
assign.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent assign = new Intent(Admin.this, AssignTask.class);
startActivity(assign);
}
});
track.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent track = new Intent(Admin.this, MapWebView.class);
startActivity(track);
}
});
}
}