package com.manubet.android.touristAndroid;





import android.app.TabActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.view.Window;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;

public class MainActivity extends TabActivity {
    public static TabHost mTabHost;
    private Resources mResources;

  
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Window window = getWindow();
        window.requestFeature(Window.FEATURE_LEFT_ICON);
        setContentView(R.layout.tab);
        mTabHost = getTabHost();       
        mResources = getResources();  
        window.setFeatureDrawableResource(Window.FEATURE_LEFT_ICON, R.drawable.logo);

        aņadirTab1();
        aņadirTab2();
        
   }
    
	//Pestaņa 1
	     
    private void aņadirTab1() {
    	Intent intent = new Intent(this, MapTab.class);
    	TabSpec spec = mTabHost.newTabSpec("map");
        spec.setIndicator(mResources.getString(R.string.Tab1), mResources.getDrawable(R.drawable.ic_map)); 
        spec.setContent(intent);
        mTabHost.addTab(spec);
    }
    
	//Pestaņa 2 

    
    private void aņadirTab2() {
    	
    	Intent intent = new Intent(this, InfoWeb.class);
        TabSpec spec = mTabHost.newTabSpec("web");
        spec.setIndicator(mResources.getString(R.string.Tab2), mResources.getDrawable(R.drawable.ic_lupa));
        spec.setContent(intent);
        mTabHost.addTab(spec); 
    }
    
    public static void swichtTab(int i){
    	mTabHost.setCurrentTab(i);
    }
}
