Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

How to run below code in Android studio please give me the step so I can run thi

ID: 3583396 • Letter: H

Question

How to run below code in Android studio please give me the step so I can run this code in Android studio to get the mobile application. I need to import in Android Studio and run please find below Java code.

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) ;

       }

    

}) ;

   }

}

Explanation / Answer

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) ;

       }

    

}) ;

   }

}

  

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote