package com.example.GPS_DB02;

import android.os.Bundle;

import java.util.Random;

import android.app.Activity;
import android.content.Intent;
import android.database.Cursor;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

public class MainActivity extends Activity 
{
	Button button;
 
    
	@Override
	public void onCreate(Bundle savedInstanceState) 
	{
			super.onCreate(savedInstanceState);
			setContentView(R.layout.activity_main);
	
			
			button = (Button) findViewById(R.id.MyButton);
			
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) 
	{
			getMenuInflater().inflate(R.menu.activity_main, menu);
			return true;
	}
	
	@Override
    public boolean onOptionsItemSelected(MenuItem item) 
	{
       
        switch (item.getItemId())
        {
        case R.id.menu_remind:
  			Toast.makeText(getApplicationContext(),"Remind",Toast.LENGTH_SHORT).show();
  			Intent Intent04 = new Intent(MainActivity.this, NewActivity.class);
  			startActivity(Intent04);
	        return true;
        
  		case R.id.menu_repeat:
  			Toast.makeText(getApplicationContext(),"Repeat",Toast.LENGTH_SHORT).show();
  			Intent Intent05 = new Intent(MainActivity.this, Control_Service.class);
  			startActivity(Intent05);
	        return true;
	        
  		case R.id.menu_list_run:
  			Toast.makeText(getApplicationContext(),"Repeat",Toast.LENGTH_SHORT).show();
  			Intent Intent08 = new Intent(MainActivity.this, Listrun.class);
  			startActivity(Intent08);
	        return true;       
	        
  		case R.id.menu_about:
  			Toast.makeText(getApplicationContext(),"CAbout",Toast.LENGTH_SHORT).show();
  			
	        return true;

  		case R.id.menu_quit:
  			Toast.makeText(getApplicationContext(),"Salut on ferme la boutique...",Toast.LENGTH_SHORT).show();
  			finish();
	        return true;    
          
  		default:
          return super.onOptionsItemSelected(item);
        
        }
    }
	
	
	
}