package com.brink.main;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;
public class barPage extends Activity {
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.barpage);
Bundle extras = new Bundle();
extras = getIntent().getExtras();
String bar = new String();
bar = extras.getString("barsname");
Log.w("Bar Made IT", bar);
//Get a handle on all the TextView type for the bar page.
StoredBar.barsName = (TextView) findViewById(R.id.barsname2);
StoredBar.barsAddress = (TextView) findViewById(R.id.barsaddress);
StoredBar.barsLocationSet = (TextView) findViewById(R.id.barslocation);
StoredBar.barSpecialMonday = (TextView) findViewById(R.id.mondayspecial);
StoredBar.barSpecialTuesday = (TextView) findViewById(R.id.tuesdayspecial);
StoredBar.barSpecialWednesday = (TextView) findViewById(R.id.wednesdayspecial);
StoredBar.barSpecialThursday = (TextView) findViewById(R.id.thursdayspecial);
StoredBar.barSpecialFriday = (TextView) findViewById(R.id.fridayspecial);
StoredBar.barSpecialSaturday = (TextView) findViewById(R.id.saturdayspecial);
StoredBar.barSpecialSunday = (TextView) findViewById(R.id.sundayspecial);
Log.w("Attached the handles", "true");
//Get a Handle on all the ImageView type for the bar page.
ImageView barLogo = (ImageView) findViewById(R.id.barslogo);
ImageView imageTaken1 = (ImageView) findViewById(R.id.imagetakenset1);
ImageView imageTaken2 = (ImageView) findViewById(R.id.imagetakenset2);
ImageView imageTaken3 = (ImageView) findViewById(R.id.imagetakenset3);
Log.w("Attached the handles", "true");
//Get a Handle on all the ImageButton type for the bar page.
ImageButton seeMoreAction = (ImageButton) findViewById(R.id.seegalleryview);
Log.w("Attached the handles", "true");
if(IncomingAPI.populatedBarPage(bar))
{
Log.w("Method Called", "true");
//Set the TextView types.
StoredBar.barsName.setText(bar);
StoredBar.barsAddress.setText(StoredBar.address);
StoredBar.barsLocationSet.setText(StoredBar.barsLocation);
StoredBar.barSpecialMonday.setText(StoredBar.specialsBundle.getString("monday"));
StoredBar.barSpecialTuesday.setText(StoredBar.specialsBundle.getString("tuesday"));
StoredBar.barSpecialWednesday.setText(StoredBar.specialsBundle.getString("wednesday"));
StoredBar.barSpecialThursday.setText(StoredBar.specialsBundle.getString("thursday"));
StoredBar.barSpecialFriday.setText(StoredBar.specialsBundle.getString("friday"));
StoredBar.barSpecialSaturday.setText(StoredBar.specialsBundle.getString("saturday"));
StoredBar.barSpecialSunday.setText(StoredBar.specialsBundle.getString("sunday"));
//Set the ImageView types.
//barLogo.setImageBitmap(?????????);
//imageTaken1.setImageBitmap(????????);
//imageTaken2.setImageBitmap(?????????);
//imageTaken3.setImageBitmap(???????????);
//TODO SET THE SOURCE FOR THE IMAGE BUTTON ON BARPAGE
Log.w("MADE IT IN IF STATEMENT", "true");
}
}
@Override
public void onStart()
{
super.onStart();
//Get a Handle on all the ImageButton type for the bar page.
ImageButton seeMoreAction = (ImageButton) findViewById(R.id.seegalleryview);
seeMoreAction.setOnClickListener(new View.OnClickListener()
{
public void onClick(View v)
{
Log.w("See Gallery View Selected", "true");
//TODO This is where we will launch a action to see the gallery view of all the recently taken pictures for this bar.
}
});
}
@Override
public void onPause()
{
super.onPause();
Log.w("Closing out this BarPage Activity", "true");
finish();
}
}