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.ImageButton;



public class Index extends Activity {
    /** Called when the activity is first created. */
	
	@Override
	public void onConfigurationChanged(Configuration newConfig) {
	super.onConfigurationChanged(newConfig);
	}
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main); 
        
        
        
        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) {
            	openMap_busActivity();
            }
        });
        
       final ImageButton restaurants = (ImageButton) findViewById(R.id.restaurants);
       restaurants.setOnClickListener(new ImageButton.OnClickListener() {
           public void onClick(View v) {
           	openRestaurantsActivity();
           }
   });
       
       final ImageButton accommodation = (ImageButton) findViewById(R.id.accommodation);
       accommodation.setOnClickListener(new ImageButton.OnClickListener() {
           public void onClick(View v) {
           	openAccommodationActivity();
           }
   });
       
       final ImageButton nightlife = (ImageButton) findViewById(R.id.nightlife);
       nightlife.setOnClickListener(new ImageButton.OnClickListener() {
           public void onClick(View v) {
           	openNightlifeActivity();
           }
   });
       
       final ImageButton transport = (ImageButton) findViewById(R.id.transport);
       transport.setOnClickListener(new ImageButton.OnClickListener() {
           public void onClick(View v) {
           	openTransportActivity();
           }
   });
   
       final ImageButton aboutcountry = (ImageButton) findViewById(R.id.country);
       aboutcountry.setOnClickListener(new ImageButton.OnClickListener() {
           public void onClick(View v) {
           	openAboutpolandActivity();
           }
   });
       
       final ImageButton city = (ImageButton) findViewById(R.id.cultural);
       city.setOnClickListener(new ImageButton.OnClickListener() {
           public void onClick(View v) {
           	openCulturalActivity();
           }
   });
       
       final ImageButton sights = (ImageButton) findViewById(R.id.sights);
       sights.setOnClickListener(new ImageButton.OnClickListener() {
           public void onClick(View v) {
           	openSightsActivity();
           }
   });
       
    }
        
    private void openIndexActivity() {
    	startActivity(new Intent(this,Index.class));
    }
    
        
    private void openTram_mapActivity() {
    	startActivity(new Intent(this,Tram_map.class));
    }
    
    private void openMap_busActivity() {
    	startActivity(new Intent(this,Bus_map.class));
    }
    
    private void openRestaurantsActivity() {
    	startActivity(new Intent(this,Restaurants.class));
    }
    
    private void openAccommodationActivity() {
    	startActivity(new Intent(this,Accommodation.class));
    }
    
    private void openNightlifeActivity() {
    	startActivity(new Intent(this,Nightlife.class));
    }
    
    private void openTransportActivity() {
    	startActivity(new Intent(this,Transport.class));
    }
    
    private void openAboutpolandActivity() {
    	startActivity(new Intent(this,Aboutpoland.class));
    }
    
    private void openCulturalActivity() {
    	startActivity(new Intent(this,Cultural.class));
    }
    
    private void openSightsActivity() {
    	startActivity(new Intent(this,Sights.class));
    }
   
}