-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBookFlight.java
63 lines (56 loc) · 2.06 KB
/
BookFlight.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
package com.example.bulletinflights;
import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.Button;
public class BookFlight extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_book_flight);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
.setAction("Action", null).show();
}
});
goBookDestination();
goMainMenu();
}
/**
* method for sending the user to the page for booking flights
*/
public void goBookDestination()
{
Button goScheduleDestinationFlight= (Button)findViewById(R.id.bookDestinationFlight);
goScheduleDestinationFlight.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent go = new Intent(BookFlight.this, BookDestinationFlight.class);
startActivity(go);
}
});
}
/**
* method for sending the user to the page for booking flights
*/
public void goMainMenu()
{
Button goMainToMenu= (Button)findViewById(R.id.MainMenuBookFlight);
goMainToMenu.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent go = new Intent(BookFlight.this, MainMenu.class);
startActivity(go);
}
});
}
}