create Project by Android studio Requirements 1.Project will be individual (each
ID: 3583201 • Letter: C
Question
create Project by Android studio Requirements 1.Project will be individual (each student will submit a complete different app) 2.A small mobile application using Android or iOS, the application 4.The app must not have less than 3 activities. I need to create small and simple project for my course using Android studio application to create mobile application need an android app to book airline and hotels from your own database, there will be no interaction with external airlines and hotels. There will be separate screens along with booking forms from air ticket booking and hotel booking. Creation of own database for airlines and hotels. Separate registration and booking request form on the app to book hotels and airlines. No interaction with real world airlines and hotel bookings. create application for booking (Airline and Hotel) Will create database for hotel name and Airlines name Will create button for go next page after full the information Will create list of choice of hotel and airline Will create list of country Will create select button and quiet button I will use button with color for every activity for use to after full of the require information by press the next button to go next activity. - In the first activity Create application button name is Airline and Hotel booking and will use data base to insert names for hotel name and Airline In the first activity chose the type booking Airline booking or Hotel booking There is two button one for Hotel booking other Airline booking - Second activity When chose any type of booking it go second activity when ask about the country name you want to book the room and your information detail as below: Activity for second page Hotel Booking Country name: City Name: Hotel Name: Date: From Time: To Time: First Name: Last Name: E-Mail: Phone Number: Then press the Button for next page its go to payment activity - Third Activity Payment and confirm the Booking: Payment way Chose the payment for booking Visa or MasterCard Full Name: Account number: Secure code: After full the Visa or MasterCard card Full name and card number Press the button for confirm and submit the booking order Activity for second page for Airline booking Airline Booking Current Country (From): Destination Country (To): Airline Name: Date: First Name: Last Name: E-Mail: Phone Number: Then press the Button for next page its go next to payment activity Payment and confirm the Booking the ticket: Payment way Chose the payment for booking Visa or MasterCard Full Name: Account number: Secure code: After full the Visa or MasterCard card Full name and card number Press the button for confirm and submit the booking order
Explanation / Answer
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle ;
import android.view.View;
import android.view.View.OnClickListener;
public class Fivestar extends Activity implements OnClickListener{
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState) ;
setContentView(R.layout.fivestar) ;
View Button = findViewById(R.id.v7) ;
Button.setOnClickListener((OnClickListener) this);
View Button1 = findViewById(R.id.b8) ;
Button1.setOnClickListener((OnClickListener) this);
View Button2 = findViewById(R.id.b9) ;
Button2.setOnClickListener((OnClickListener) this);
View Button3 = findViewById(R.id.b10) ;
Button3.setOnClickListener((OnClickListener) this);
View Button4 = findViewById(R.id.b11) ;
Button4.setOnClickListener((OnClickListener) this);
View Button5 = findViewById(R.id.b12) ;
Button5.setOnClickListener((OnClickListener) this);
View Button6 = findViewById(R.id.b13) ;
Button6.setOnClickListener((OnClickListener) this);
View Button7 = findViewById(R.id.b14) ;
Button7.setOnClickListener((OnClickListener) this);}
public void onClick(View v) {
switch (v.getId()) {
case R.id.v7:
Intent i = new Intent(this, Viventa.class);
startActivity(i);
break;
case R.id.b8 : Intent j = new Intent(this, Hyatt.class) ;
startActivity(j) ;
break ;
case R.id.b9 : Intent k = new Intent(this, Lalit.class) ;
startActivity(k) ;
break ;
case R.id.b10 : Intent l = new Intent(this, Lodhi.class) ;
startActivity(l) ;
break ;
case R.id.b11 : Intent m = new Intent(this, Leela.class) ;
startActivity(m) ;
break ;
case R.id.b12 : Intent n = new Intent(this, Taj.class) ;
startActivity(n) ;
break ;
case R.id.b13 : Intent o = new Intent(this, Grand.class) ;
startActivity(o) ;
break ;
case R.id.b14 : Intent p = new Intent(this, Oberoi.class) ;
startActivity(p) ;
break ;
}
}
}
import android.app.Activity;
import android.os.Bundle ;
public class Fourstar extends Activity{
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState) ;
setContentView(R.layout.fourstar) ;
}
}
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
public class Grand extends Activity{
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState) ;
setContentView(R.layout.grand) ;
View b1 = (Button)findViewById(R.id.g1) ;
b1.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Intent i = new Intent(android.content.Intent.ACTION_VIEW,
Uri.parse("http://www.grandcityhotels.com")) ;
startActivity(i) ;
}
}) ;
View b2 = (Button)findViewById(R.id.g2) ;
b2.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Intent i = new Intent(android.content.Intent.ACTION_DIAL,
Uri.parse("tel:+49308870880")) ;
startActivity(i) ;
}
}) ;
View b3 = (Button)findViewById(R.id.g3) ;
b3.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Intent i = new Intent(android.content.Intent.ACTION_DIAL,
Uri.parse("tel:+31-20-6 54 15 62")) ;
startActivity(i) ;
}
}) ;
View b4 = (Button)findViewById(R.id.g4) ;
b4.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Intent i = new Intent(android.content.Intent.ACTION_DIAL,
Uri.parse("tel:+7916 026 1133")) ;
startActivity(i) ;
}
}) ;
View b6 = (Button)findViewById(R.id.g5) ;
b6.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Intent i = new Intent(android.content.Intent.ACTION_DIAL,
Uri.parse("tel:+33-1-5343 7900")) ;
startActivity(i) ;
}
}) ;
View b5 = (Button)findViewById(R.id.g6) ;
b5.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Intent i = new Intent(android.content.Intent.ACTION_DIAL,
Uri.parse("tel:86 63 59 15 35")) ;
startActivity(i) ;
}
}) ;
View b7 = (Button)findViewById(R.id.g7) ;
b7.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Intent i = new Intent(android.content.Intent.ACTION_DIAL,
Uri.parse("tel:+46 8 545 259 55")) ;
startActivity(i) ;
}
}) ;
View b8 = (Button)findViewById(R.id.g8) ;
b8.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Intent i = new Intent(android.content.Intent.ACTION_DIAL,
Uri.parse("tel:+34 – 91- 458 57 27")) ;
startActivity(i) ;
}
}) ;
View b9 = (Button)findViewById(R.id.g9) ;
b9.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Intent i = new Intent(android.content.Intent.ACTION_DIAL,
Uri.parse("tel:+39 - 02 - 43 45 83 11")) ;
startActivity(i) ;
}
}) ;
}
}
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
public class H1Activity extends Activity {
// Splash screen timer
private static int SPLASH_TIME_OUT = 2000;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.h1);
new Handler().postDelayed(new Runnable() {
/*
* Showing splash screen with a timer. This will be useful when you
* want to show case your app logo / company
*/
@Override
public void run() {
// This method will be executed once the timer is over
// Start your app main activity
Intent i = new Intent(H1Activity.this, H2.class);
startActivity(i);
// close this activity
finish();
}
}, SPLASH_TIME_OUT);
}
}
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle ;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
public class H2 extends Activity implements OnClickListener{
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState) ;
setContentView(R.layout.hb2) ;
View b4 = (Button) findViewById(R.id.b4) ;
b4.setOnClickListener(this) ;
b4.setSelected(true) ;
View b6 = (Button) findViewById(R.id.b6) ;
b6.setOnClickListener(this) ;
b6.setSelected(true) ;
}
public void onClick(View V){
if(V.getId() == R.id.b4)
{
Intent i = new Intent(this, H6.class) ;
startActivity(i) ;
}
else
{
Intent j = new Intent(this, H8.class) ;
startActivity(j) ;
}
}
}
import android.app.Activity ;
import android.content.Intent;
import android.os.Bundle ;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
public class H6 extends Activity implements OnClickListener{
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState) ;
setContentView(R.layout.searchhotels) ;
View b4 = (Button) findViewById(R.id.search) ;
b4.setOnClickListener(this) ;
b4.setSelected(true) ;
}
public void onClick(View V){
if(V.getId() == R.id.search)
{
Intent i = new Intent(this, Fivestar.class) ;
startActivity(i) ;
}
}
}
import android.app.Activity ;
import android.content.Intent;
import android.os.Bundle ;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
public class H8 extends Activity implements OnClickListener{
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState) ;
setContentView(R.layout.hreservation) ;
View b1 = (Button) findViewById(R.id.b1) ;
b1.setOnClickListener(this) ;
b1.setSelected(true) ;
View b2 = (Button) findViewById(R.id.b2) ;
b2.setOnClickListener(this) ;
b2.setSelected(true) ;
}
public void onClick(View V){
if(V.getId()== R.id.b1){
Intent i = new Intent(this, Fivestar.class) ;
startActivity(i) ;
}
else{
Intent j = new Intent(this, Fourstar.class);
startActivity(j) ;
}
}
}
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
public class Hyatt extends Activity{
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState) ;
setContentView(R.layout.hyatt) ;
View b1 = (Button)findViewById(R.id.h1) ;
b1.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Intent i = new Intent(android.content.Intent.ACTION_VIEW,
Uri.parse("http://www.hyatt.com")) ;
startActivity(i) ;
}
}) ;
View b2 = (Button)findViewById(R.id.h2) ;
b2.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Intent i = new Intent(android.content.Intent.ACTION_DIAL,
Uri.parse("tel:+541152184518")) ;
startActivity(i) ;
}
}) ;
View b3 = (Button)findViewById(R.id.h3) ;
b3.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Intent i = new Intent(android.content.Intent.ACTION_DIAL,
Uri.parse("tel:+551132578855")) ;
startActivity(i) ;
}
}) ;
View b4 = (Button)findViewById(R.id.h4) ;
b4.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Intent i = new Intent(android.content.Intent.ACTION_DIAL,
Uri.parse("tel:+5716100599")) ;
startActivity(i) ;
}
}) ;
View b5 = (Button)findViewById(R.id.h5) ;
b5.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Intent i = new Intent(android.content.Intent.ACTION_DIAL,
Uri.parse("tel:+14025376835")) ;
startActivity(i) ;
}
}) ;
View b6 = (Button)findViewById(R.id.h6) ;
b6.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Intent i = new Intent(android.content.Intent.ACTION_DIAL,
Uri.parse("tel:018000050000")) ;
startActivity(i) ;
}
}) ;
View b7 = (Button)findViewById(R.id.h7) ;
b7.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Intent i = new Intent(android.content.Intent.ACTION_DIAL,
Uri.parse("tel:18002331234")) ;
startActivity(i) ;
}
}) ;
View b8 = (Button)findViewById(R.id.h8) ;
b8.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Intent i = new Intent(android.content.Intent.ACTION_DIAL,
Uri.parse("tel:131234")) ;
startActivity(i) ;
}
}) ;
View b9 = (Button)findViewById(R.id.h9) ;
b9.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Intent i = new Intent(android.content.Intent.ACTION_DIAL,
Uri.parse("tel:+85229561234")) ;
startActivity(i) ;
}
}) ;
View b10 = (Button)findViewById(R.id.h10) ;
b10.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Intent i = new Intent(android.content.Intent.ACTION_DIAL,
Uri.parse("tel:+18001221234")) ;
startActivity(i) ;
}
}) ;
View b11 = (Button)findViewById(R.id.h11) ;
b11.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Intent i = new Intent(android.content.Intent.ACTION_DIAL,
Uri.parse("tel:0120512343")) ;
startActivity(i) ;
}
}) ;
View b12 = (Button)findViewById(R.id.h12) ;
b12.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Intent i = new Intent(android.content.Intent.ACTION_DIAL,
Uri.parse("tel:+80002001234")) ;
startActivity(i) ;
}
}) ;
View b13 = (Button)findViewById(R.id.h13) ;
b13.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Intent i = new Intent(android.content.Intent.ACTION_DIAL,
Uri.parse("tel:1800818188")) ;
startActivity(i) ;
}
}) ;
View b14 = (Button)findViewById(R.id.h14) ;
b14.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Intent i = new Intent(android.content.Intent.ACTION_DIAL,
Uri.parse("tel:0800441234")) ;
startActivity(i) ;
}
}) ;
View b15 = (Button)findViewById(R.id.h15) ;
b15.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Intent i = new Intent(android.content.Intent.ACTION_DIAL,
Uri.parse("tel:80011085")) ;
startActivity(i) ;
}
}) ;
View b16 = (Button)findViewById(R.id.h16) ;
b16.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Intent i = new Intent(android.content.Intent.ACTION_DIAL,
Uri.parse("tel:+8651255001234")) ;
startActivity(i) ;
}
}) ;
View b17 = (Button)findViewById(R.id.h17) ;
b17.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Intent i = new Intent(android.content.Intent.ACTION_DIAL,
Uri.parse("tel:+6531587887")) ;
startActivity(i) ;
}
}) ;
View b18 = (Button)findViewById(R.id.h18) ;
b18.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Intent i = new Intent(android.content.Intent.ACTION_DIAL,
Uri.parse("tel:08009731234")) ;
startActivity(i) ;
}
}) ;
}
}
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.