-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainActivity.java
99 lines (85 loc) · 3.65 KB
/
MainActivity.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
package com.example.meetpaija.myrail;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.RelativeLayout;
import com.example.meetpaija.myrail.PNRNumber.PNRSearch;
import com.example.meetpaija.myrail.SeatAvailability.SeatAvailabilityInfo;
import com.example.meetpaija.myrail.TrainArrive.TrainArriveAtStation;
import com.example.meetpaija.myrail.TrainBetweenStationsPackage.TrainBetweenStations;
import com.example.meetpaija.myrail.TrainFare.TrainFareEnquiry;
import com.example.meetpaija.myrail.TrainSchedule.TrainScheduleSearch;
public class MainActivity extends AppCompatActivity {
RelativeLayout schedule,pnrnum,trainstatus,trainsBetweenStations,trainArriveAtStation,seatAvailability,trainFare,otherInfo;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
schedule=(RelativeLayout)findViewById(R.id.schedule);
// pnrnum=(RelativeLayout)findViewById(R.id.pnr);
trainstatus=(RelativeLayout)findViewById(R.id.status);
trainsBetweenStations=(RelativeLayout)findViewById(R.id.stations);
trainArriveAtStation=(RelativeLayout)findViewById(R.id.trainsAtStation);
seatAvailability=(RelativeLayout)findViewById(R.id.seatAvailability);
trainFare=(RelativeLayout)findViewById(R.id.trainFareEnquiry);
otherInfo=(RelativeLayout)findViewById(R.id.otherInfo);
trainFare.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent i=new Intent(MainActivity.this,TrainFareEnquiry.class);
startActivity(i);
}
});
trainArriveAtStation.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent i=new Intent(MainActivity.this,TrainArriveAtStation.class);
startActivity(i);
}
});
seatAvailability.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent i=new Intent(MainActivity.this,SeatAvailabilityInfo.class);
startActivity(i);
}
});
otherInfo.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent i=new Intent(MainActivity.this,OtherInfo.class);
startActivity(i);
}
});
trainsBetweenStations.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent i=new Intent(MainActivity.this,TrainBetweenStations.class);
startActivity(i);
}
});
schedule.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent i=new Intent(MainActivity.this,TrainScheduleSearch.class);
startActivity(i);
}
});
/* pnrnum.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent i=new Intent(MainActivity.this,PNRSearch.class);
startActivity(i);
}
});
*/
trainstatus.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent i=new Intent(MainActivity.this,TrainStatusSearch.class);
startActivity(i);
}
});
}
}