diff --git a/UNCCScavenger/res/layout/activity_search.xml b/UNCCScavenger/res/layout/activity_search.xml
index c4e7417..e631157 100644
--- a/UNCCScavenger/res/layout/activity_search.xml
+++ b/UNCCScavenger/res/layout/activity_search.xml
@@ -44,6 +44,12 @@
android:layout_weight="0"
android:orientation="vertical" >
+
+
diff --git a/UNCCScavenger/src/edu/uncc/scavenger/SearchActivity.java b/UNCCScavenger/src/edu/uncc/scavenger/SearchActivity.java
index b19be74..dfcacea 100644
--- a/UNCCScavenger/src/edu/uncc/scavenger/SearchActivity.java
+++ b/UNCCScavenger/src/edu/uncc/scavenger/SearchActivity.java
@@ -37,7 +37,7 @@ import android.widget.Toast;
public class SearchActivity extends Activity {
ImageView locationImage;
- Button compassButton, scanButton;
+ Button compassButton, scanButton, resultButton;
TextView locationText, riddleView;
Intent intent;
RestLocation restLocation;
@@ -52,6 +52,7 @@ public class SearchActivity extends Activity {
locationImage = (ImageView)findViewById(R.id.locationImage);
compassButton = (Button)findViewById(R.id.compassButton);
scanButton = (Button)findViewById(R.id.scanButton);
+ resultButton = (Button)findViewById(R.id.btnViewResult);
riddleView = (TextView)findViewById(R.id.riddleView);
restLocation = (RestLocation)(getIntent().getSerializableExtra("restLocation"));
@@ -59,6 +60,9 @@ public class SearchActivity extends Activity {
locationText.setText(restLocation.getName());
riddleView.setText(restLocation.getRiddle());
+ if (restLocation.getKey() != null) {
+ resultButton.setVisibility(View.VISIBLE);
+ }
scanButton.setOnClickListener(new OnClickListener(){
@@ -133,6 +137,15 @@ public class SearchActivity extends Activity {
}
});
+ resultButton.setOnClickListener(new OnClickListener() {
+ @Override
+ public void onClick(View arg0) {
+ Intent i = new Intent(SearchActivity.this, FoundActivity.class);
+ i.putExtra("restLocation", restLocation);
+ startActivity(i);
+ }
+ });
+
Bitmap locationPicture = BitmapAccess.loadBitmap(this, restLocation.getName());
if(locationPicture != null)
{