package com.example.patrice.rerservation01;

import android.app.Dialog;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;

public class options extends AppCompatActivity
{
    Button btn_apropos, btn_gps, btn_options_utilisateur, btn_login_admin;

    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.options_layout);


        btn_apropos = (Button) findViewById(R.id.btn_apropos);

        btn_apropos.setOnClickListener(new View.OnClickListener()
        {
            public void onClick(View arg0)
            {
               about();
            }
        });

        btn_gps = (Button) findViewById(R.id.btn_gps);

        btn_gps.setOnClickListener(new View.OnClickListener()
        {
            public void onClick(View arg0)
            {
                Intent i = new Intent(getApplicationContext(), gps_location_02.class);
                startActivity(i);
            }
        });


        btn_options_utilisateur = (Button) findViewById(R.id.btn_options_utilisateur);

        btn_options_utilisateur.setOnClickListener(new View.OnClickListener()
        {
            public void onClick(View arg0)
            {
               // Intent i = new Intent(getApplicationContext(), compte_utilisateur.class);
                Intent i = new Intent(getApplicationContext(), gps_location_03.class);

                startActivity(i);
            }
        });

        btn_login_admin = (Button) findViewById(R.id.btn_login_admin);

        btn_login_admin.setOnClickListener(new View.OnClickListener()
        {
            public void onClick(View arg0)
            {
                Intent i = new Intent(getApplicationContext(), admin_tools.class);
                startActivity(i);
            }
        });

    }

    public void about()
    {
        final Dialog dialog = new Dialog(options.this);

        dialog.setContentView(R.layout.about_layout);
        dialog.setTitle("A propos de l'appli:");
        dialog.show();

        Button dialogCloseButton = (Button) dialog.findViewById(R.id.close_button);

        dialogCloseButton.setOnClickListener(new View.OnClickListener()
        {
            @Override
            public void onClick(View v)
            {
                dialog.dismiss();
            }
        });

    }

}

