package com.example.toyo5_slideshow;

import java.util.Timer;
import java.util.TimerTask;

import android.os.Bundle;
import android.os.Handler;
import android.app.Activity;
import android.view.Menu;

public class MainActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		setContentView(R.layout.activity_main); 
				
		 final Handler handler = new Handler(); 
	        Timer t = new Timer(); 
	        t.schedule(new TimerTask() { 
	                public void run() { 
	                        handler.post(new Runnable() { 
	                                public void run() { 	                                	
	                                	setContentView(R.layout.sinaiacentru);
	                                }								
	                        }); 
	                } 
	        }, 3000); 
	        
			 new Handler(); 
		        new Timer(); 
		        t.schedule(new TimerTask() { 
		                public void run() { 
		                        handler.post(new Runnable() { 
		                                public void run() { 		                                	
		                                	setContentView(R.layout.sinaiacentru2);
		                                } 
		                        }); 
		                } 
		        }, 6000); 
		        	        
	 new Handler(); 
			        new Timer(); 
			        t.schedule(new TimerTask() { 
			                public void run() { 
			                        handler.post(new Runnable() { 
			                                public void run() { 
			                                	setContentView(R.layout.sinaiacentrul);
			                                } 
			                        }); 
			                } 
			        }, 9000); 
	        
	new Handler(); 
			        new Timer(); 
			        t.schedule(new TimerTask() { 
			                public void run() { 
			                        handler.post(new Runnable() { 
			                                public void run() { 
			                                	setContentView(R.layout.sinaiacote);
			                                } 
			                        }); 
			                } 
	 }, 12000); 
	        

	new Handler(); 
			        new Timer(); 
			        t.schedule(new TimerTask() { 
			                public void run() { 
			                        handler.post(new Runnable() { 
			                                public void run() { 
			                                	setContentView(R.layout.sinaiatrenulet);
			                                } 
			                        }); 
			                } 
	 }, 15000); 
        
	new Handler(); 
			        new Timer(); 
			        t.schedule(new TimerTask() { 
			                public void run() { 
			                        handler.post(new Runnable() { 
			                                public void run() { 
			                                	setContentView(R.layout.sinaiafantana);
			                                } 
			                        }); 
			                } 
	 }, 18000); 
	        
	 new Handler(); 
			        new Timer(); 
			        t.schedule(new TimerTask() { 
			                public void run() { 
			                        handler.post(new Runnable() { 
			                                public void run() { 
			                                	setContentView(R.layout.sinaiahotel);
			                                } 
			                        }); 
			                } 
	 }, 21000); 
	        
	new Handler(); 
			        new Timer(); 
			        t.schedule(new TimerTask() { 
			                public void run() { 
			                        handler.post(new Runnable() { 
			                                public void run() { 
			                                	setContentView(R.layout.sinaiaparc);
			                                } 
			                        }); 
			                } 
	 }, 24000); 
			        
	new Handler(); 
			        new Timer(); 
			        t.schedule(new TimerTask() { 
			                public void run() { 
			                        handler.post(new Runnable() { 
			                                public void run() { 
			                                	setContentView(R.layout.sinaiapeles);
			                                } 
			                        }); 
			                } 
	 }, 27000); 
	        
	new Handler(); 
			        new Timer(); 
			        t.schedule(new TimerTask() { 
			                public void run() { 
			                        handler.post(new Runnable() { 
			                                public void run() { 
			                                	setContentView(R.layout.sinaiastatui);
			                                } 
			                        }); 
			                } 
	 }, 30000);	
			        
	new Handler(); 
			        new Timer(); 
			        t.schedule(new TimerTask() { 
			                public void run() { 
			                        handler.post(new Runnable() { 
			                                public void run() { 
			                                	setContentView(R.layout.sinaiastatuie);
			                                } 
			                        }); 
			                } 
	 }, 33000);	
			      
	new Handler(); 
			        new Timer(); 
			        t.schedule(new TimerTask() { 
			                public void run() { 
			                        handler.post(new Runnable() { 
			                                public void run() { 
			                                	setContentView(R.layout.sinaiatiroliana);
			                                } 
			                        }); 
			                } 
	 }, 36000);
			     
	new Handler(); 
			        new Timer(); 
			        t.schedule(new TimerTask() { 
			                public void run() { 
			                        handler.post(new Runnable() { 
			                                public void run() { 
			                                	setContentView(R.layout.sinaiaeminescu);
			                                } 
			                        }); 
			                } 
	 }, 39000);
			        	        
}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

}
