package com.example.converter;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MenuActivity extends Activity {
    private static String TAG = "MenuActivity";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.menu);
        Log.v(TAG, "In onCreate()");

        Button temperatureButton =
                (Button) findViewById(R.id.temperature);
        temperatureButton.setOnClickListener(new OnClickListener() {
            public void onClick(View v) {
                Intent i = new Intent(MenuActivity.this,
                         TemperatureConverterActivity.class);
                startActivity(i);
            }
        });

        Button distanceButton = (Button) findViewById(R.id.distance);
        distanceButton.setOnClickListener(new OnClickListener() {
            public void onClick(View v) {
                Intent i = new Intent(MenuActivity.this,
                        DistanceConverterActivity.class);
                startActivity(i);
            }
        });
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        Log.v(TAG, "In onDestroy()");
    }

    @Override
    protected void onPause() {
        super.onPause();
        Log.v(TAG, "In onPause()");
    }

    @Override
    protected void onRestart() {
        super.onRestart();
        Log.v(TAG, "In onRestart()");
    }

    @Override
    protected void onResume() {
        super.onResume();
        Log.v(TAG, "In onResume()");
    }

    @Override
    protected void onStart() {
        super.onStart();
        Log.v(TAG, "In onStart()");
    }

    @Override
    protected void onStop() {
        super.onStop();
        Log.v(TAG, "In onStop()");
    }
}
