From ce4216356981901c485aaa68962433dab1adc6ae Mon Sep 17 00:00:00 2001 From: tokugawa Date: Tue, 29 Apr 2014 14:52:40 -0400 Subject: [PATCH] Added some comments, fixed spelling, removed rest of extra unused code. --- UNCCScavenger/image_sources.txt | 3 +++ UNCCScavenger/res/layout/list_location.xml | 4 ++-- UNCCScavenger/src/edu/uncc/scavenger/BitmapAccess.java | 2 +- UNCCScavenger/src/edu/uncc/scavenger/CompassActivity.java | 2 +- UNCCScavenger/src/edu/uncc/scavenger/SearchActivity.java | 3 --- 5 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 UNCCScavenger/image_sources.txt diff --git a/UNCCScavenger/image_sources.txt b/UNCCScavenger/image_sources.txt new file mode 100644 index 0000000..29e15df --- /dev/null +++ b/UNCCScavenger/image_sources.txt @@ -0,0 +1,3 @@ +arrow_up.png: http://findicons.com/search/up-arrow +checkbox_checked: http://findicons.com/search/checkbox +checkbox_unchecked: http://findicons.com/search/checkbox \ No newline at end of file diff --git a/UNCCScavenger/res/layout/list_location.xml b/UNCCScavenger/res/layout/list_location.xml index dfdf49c..df55438 100644 --- a/UNCCScavenger/res/layout/list_location.xml +++ b/UNCCScavenger/res/layout/list_location.xml @@ -19,7 +19,7 @@ android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_toRightOf="@+id/imgIsFound" - android:text="TextView" + android:text="@string/default_text" android:textSize="20sp" /> diff --git a/UNCCScavenger/src/edu/uncc/scavenger/BitmapAccess.java b/UNCCScavenger/src/edu/uncc/scavenger/BitmapAccess.java index 562dea2..81b13bc 100644 --- a/UNCCScavenger/src/edu/uncc/scavenger/BitmapAccess.java +++ b/UNCCScavenger/src/edu/uncc/scavenger/BitmapAccess.java @@ -4,7 +4,7 @@ package edu.uncc.scavenger; * Bradlee Speice, Brandon Rodenmayer * ITIS 4180 * UNCCScavenger (NinerFinder) - * CompassActivity.java + * BitmapAccess.java */ //Reference: stackoverflow.com/questions/19978100/how-to-save-bitmap-on-internal-storage-download-from-internet diff --git a/UNCCScavenger/src/edu/uncc/scavenger/CompassActivity.java b/UNCCScavenger/src/edu/uncc/scavenger/CompassActivity.java index 8ce3411..5d0f03f 100644 --- a/UNCCScavenger/src/edu/uncc/scavenger/CompassActivity.java +++ b/UNCCScavenger/src/edu/uncc/scavenger/CompassActivity.java @@ -109,7 +109,6 @@ public class CompassActivity extends Activity implements SensorEventListener return true; } - @Override public void onSensorChanged(SensorEvent event) { @@ -133,6 +132,7 @@ public class CompassActivity extends Activity implements SensorEventListener SensorManager.getRotationMatrix(rotation, inclination, gravity, magneticField); SensorManager.getOrientation(rotation, compassValues); + //azimuth is compassValues[0] //Calculate true north and angle to desired location float trueHeading = (float)(Math.toDegrees(compassValues[0]) + locationListener.getDeclination()); //Calculate bearing to search location diff --git a/UNCCScavenger/src/edu/uncc/scavenger/SearchActivity.java b/UNCCScavenger/src/edu/uncc/scavenger/SearchActivity.java index 12f9bc5..afb242e 100644 --- a/UNCCScavenger/src/edu/uncc/scavenger/SearchActivity.java +++ b/UNCCScavenger/src/edu/uncc/scavenger/SearchActivity.java @@ -24,9 +24,7 @@ import android.location.LocationManager; import android.net.Uri; import android.os.AsyncTask; import android.os.Bundle; -import android.util.Log; import android.view.Menu; -import android.view.MenuItem; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; @@ -56,7 +54,6 @@ public class SearchActivity extends Activity { riddleView = (TextView)findViewById(R.id.riddleView); restLocation = (RestLocation)(getIntent().getSerializableExtra("restLocation")); - //Log.d("restLocation", restLocation.getName()); locationText.setText(restLocation.getName()); riddleView.setText(restLocation.getRiddle());