-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHome.java
77 lines (57 loc) · 2.36 KB
/
Home.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
package com.example.documems;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class Home extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home);
Button trip1_button = (Button)findViewById(R.id.trip1_button);
trip1_button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Store_Trips.setI(0);
Intent startIntent = new Intent (getApplicationContext(),View_Trip.class);
startActivity(startIntent);
}
});
Button trip2_button = (Button)findViewById(R.id.trip2_button);
trip2_button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Store_Trips.setI(1);
Intent startIntent = new Intent (getApplicationContext(),View_Trip.class);
startActivity(startIntent);
}
});
Button trip3_button = (Button)findViewById(R.id.trip3_button);
trip3_button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Store_Trips.setI(2);
Intent startIntent = new Intent (getApplicationContext(),View_Trip.class);
startActivity(startIntent);
}
});
Button trip4_button = (Button)findViewById(R.id.trip4_button);
trip4_button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Store_Trips.setI(3);
Intent startIntent = new Intent (getApplicationContext(),View_Trip.class);
startActivity(startIntent);
}
});
Button create_new_trip = (Button)findViewById(R.id.create_new_trip);
create_new_trip.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent startIntent = new Intent (getApplicationContext(),Create_New_Trip.class);
startActivity(startIntent);
}
});
}
}