package com.example.drinkingapp;

import android.app.Activity;
import android.content.ActivityNotFoundException;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.view.View.OnClickListener;
import android.widget.Button;

public class Resources extends Activity implements OnClickListener{


	Button home, tracking, assessment, visualize, settings, resources,gannett;
	Intent goToThisPage,call;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);//full screen
		getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
		setContentView(R.layout.resources);
		home=(Button)findViewById(R.id.bMenuBottomHome);
		tracking=(Button)findViewById(R.id.bMenuBottomTracking);
		assessment=(Button)findViewById(R.id.bMenuBottomAssessment);
		visualize=(Button)findViewById(R.id.bMenuBottomVisualize);
		settings=(Button)findViewById(R.id.bMenuBottomSettings);
		gannett=(Button)findViewById(R.id.bCallGannett);
		//resources=(Button)findViewById(R.id.bMenuBottomResources);
		
		home.setOnClickListener(this);
		tracking.setOnClickListener(this);
		assessment.setOnClickListener(this);
		visualize.setOnClickListener(this);
		settings.setOnClickListener(this);
		gannett.setOnClickListener(this);
		//resources.setOnClickListener(this);
		
	}

	@Override
	public void onClick(View arg0) {
		// TODO Auto-generated method stub
		switch(arg0.getId()){
		case R.id.bMenuBottomHome:
			goToThisPage = new Intent(this,Menu.class);
			startActivity(goToThisPage);
			break;
		case R.id.bMenuBottomTracking:
			//goToThisPage = new Intent(Menu.this,Class.Tracking);
			break;
		case R.id.bMenuBottomAssessment:
			//goToThisPage = new Intent(Menu.this,Class.Assessment);
			break;
		case R.id.bMenuBottomVisualize:
			//goToThisPage = new Intent(Menu.this,Class.Visualize);
			break;
		case R.id.bMenuBottomSettings:
			//goToThisPage = new Intent(Menu.this,Class.Settings);
			break;
		case R.id.bCallGannett:
			 try {
                  call = new Intent(Intent.ACTION_CALL);
                  call.setData(Uri.parse("tel:2164025724"));
                 startActivity(call);
             } catch (ActivityNotFoundException activityException) {
                 Log.e("Calling a Phone Number", "Call failed", activityException);
             }
			break;
		}

	}

}

@@ -616,45 +616,8 @@
 ) %7B%0A
-%09%09// TODO Auto-generated method stub%0A
 %09%09su
@@ -1210,71 +1210,8 @@
 t);%0A
-%09%09//resources=(Button)findViewById(R.id.bMenuBottomResources);%0A
 %09%09%0A%09
@@ -1618,81 +1618,15 @@
 %0A%09%09%09
-goToThisPage = new Intent(this,Menu.class);%0A%09%09%09startActivity(goToThisPage
+finish(
 );%0A%09
@@ -1666,26 +1666,37 @@
 racking:%0A%09%09%09
-//
+finish();%0A%09%09%09
 goToThisPage
@@ -1713,32 +1713,63 @@
 ent(
-Menu.this,Class.Tracking
+this,DrinkCounter.class);%0A%09%09%09startActivity(goToThisPage
 );%0A%09
@@ -1811,26 +1811,37 @@
 essment:%0A%09%09%09
-//
+finish();%0A%09%09%09
 goToThisPage
@@ -1858,34 +1858,61 @@
 ent(
-Menu.this,Class.Assessment
+this,Assessment.class);%0A%09%09%09startActivity(goToThisPage
 );%0A%09
@@ -1953,26 +1953,37 @@
 sualize:%0A%09%09%09
-//
+finish();%0A%09%09%09
 goToThisPage
@@ -2000,32 +2000,64 @@
 ent(
-Menu.this,Class.Visualiz
+this, VisualizeMenu.class);%0A%09%09%09startActivity(goToThisPag
 e);%0A
@@ -2102,18 +2102,29 @@
 ngs:%0A%09%09%09
-//
+finish();%0A%09%09%09
 goToThis
@@ -2145,32 +2145,60 @@
 ent(
-Menu.this,Class.Settings
+this, Settings.class);%0A%09%09%09startActivity(goToThisPage
 );%0A%09

Fix buttons at bottom