-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOtherInfo.java
53 lines (48 loc) · 1.81 KB
/
OtherInfo.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
package com.example.meetpaija.myrail;
import android.content.Intent;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.MenuItem;
import android.view.View;
import android.widget.RelativeLayout;
import com.example.meetpaija.myrail.CancellTrainPackage.CancellTrain;
import com.example.meetpaija.myrail.ReScheduleTrainPackage.RescheduleTrains;
public class OtherInfo extends AppCompatActivity {
RelativeLayout Cancell;
RelativeLayout Reschedule;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_other_info);
ActionBar actionBar=getSupportActionBar();
actionBar.setTitle("Other Information");
actionBar.setDisplayHomeAsUpEnabled(true);
Cancell=(RelativeLayout)findViewById(R.id.canceltrain);
Reschedule=(RelativeLayout)findViewById(R.id.rescheduletrain);
Cancell.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent i=new Intent(OtherInfo.this,CancellTrain.class);
startActivity(i);
}
});
Reschedule.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent i=new Intent(OtherInfo.this,RescheduleTrains.class);
startActivity(i);
}
});
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
finish();
overridePendingTransition(R.anim.fade_in, R.anim.right_slide_out);
return true;
}
return true;
}
}