package com.cityguide;

import android.app.Activity;

import android.content.Intent;
import android.content.res.Configuration;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageButton;




public class Transport extends Activity {  
	
	@Override
	public void onConfigurationChanged(Configuration newConfig) {
	super.onConfigurationChanged(newConfig);
	}
	
	@Override
    public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.transport); 
    
    
    final ImageButton index = (ImageButton) findViewById(R.id.logodown);
    index.setOnClickListener(new ImageButton.OnClickListener() {
        public void onClick(View v) {
        	openIndexActivity();
        }
    });

    final ImageButton train = (ImageButton) findViewById(R.id.train);
    train.setOnClickListener(new ImageButton.OnClickListener() {
         public void onClick(View v) {
         	openTram_mapActivity();
         }
     });
    
    final ImageButton bus = (ImageButton) findViewById(R.id.bus);
    bus.setOnClickListener(new ImageButton.OnClickListener() {
         public void onClick(View v) {
         	openBus_mapActivity();
         }
     });
    
    final Button publictrans = (Button) findViewById(R.id.publictrans);
    publictrans.setOnClickListener(new Button.OnClickListener() {
         public void onClick(View v) {
         	openPublictransActivity();
         }
     });
    
    final Button taxis = (Button) findViewById(R.id.taxis);
    taxis.setOnClickListener(new Button.OnClickListener() {
         public void onClick(View v) {
         	openT_taxiActivity();
         }
     });
    
    final Button carrental = (Button) findViewById(R.id.carrental);
    carrental.setOnClickListener(new Button.OnClickListener() {
         public void onClick(View v) {
         	openT_car_rentalActivity();
         }
     });
    
    final Button bybus = (Button) findViewById(R.id.bybus);
    bybus.setOnClickListener(new Button.OnClickListener() {
         public void onClick(View v) {
         	openT_bybusActivity();
         }
     });
    
    final Button byplane = (Button) findViewById(R.id.byplane);
    byplane.setOnClickListener(new Button.OnClickListener() {
         public void onClick(View v) {
         	openT_byplaneActivity();
         }
     });
    
    final Button bytrain = (Button) findViewById(R.id.bytrain);
    bytrain.setOnClickListener(new Button.OnClickListener() {
         public void onClick(View v) {
         	openT_bytrainActivity();
         }
     });
    
    final Button bycar = (Button) findViewById(R.id.bycar);
    bycar.setOnClickListener(new Button.OnClickListener() {
         public void onClick(View v) {
         	openT_bycarActivity();
         }
     });
    
	}
    
     
	private void openIndexActivity() {
    	startActivity(new Intent(this,Index.class));
    }
	
	private void openTram_mapActivity() {
    	startActivity(new Intent(this,Tram_map.class));
    }
    
    private void openBus_mapActivity() {
    	startActivity(new Intent(this,Bus_map.class));
    }
    
    private void openPublictransActivity() {
    	startActivity(new Intent(this,Publictrans.class));
    }
    
    private void openT_taxiActivity() {
    	startActivity(new Intent(this,T_taxi.class));
    }
    
    private void openT_car_rentalActivity() {
    	startActivity(new Intent(this,T_car_rental.class));
    }
    
    private void openT_bybusActivity() {
    	startActivity(new Intent(this,T_bybus.class));
    }
    
    private void openT_byplaneActivity() {
    	startActivity(new Intent(this,T_byplane.class));
    }
    
    private void openT_bytrainActivity() {
    	startActivity(new Intent(this,T_bytrain.class));
    }
    
    private void openT_bycarActivity() {
    	startActivity(new Intent(this,T_bycar.class));
    }
}