From 1730177525654d826e9530fc01d7ab80fc6a36a3 Mon Sep 17 00:00:00 2001 From: tokugawa Date: Sat, 26 Apr 2014 10:28:58 -0400 Subject: [PATCH] Changed activity names and added padding to checkboxes. Removed compass rose. --- UNCCScavenger/res/layout/activity_compass.xml | 9 --------- UNCCScavenger/res/layout/list_location.xml | 1 + UNCCScavenger/res/values/strings.xml | 6 +++--- .../src/edu/uncc/scavenger/CompassActivity.java | 10 +++------- 4 files changed, 7 insertions(+), 19 deletions(-) diff --git a/UNCCScavenger/res/layout/activity_compass.xml b/UNCCScavenger/res/layout/activity_compass.xml index 7d65475..826df89 100644 --- a/UNCCScavenger/res/layout/activity_compass.xml +++ b/UNCCScavenger/res/layout/activity_compass.xml @@ -12,15 +12,6 @@ android:layout_height="wrap_content" android:layout_weight="1" > - - Settings Hello world! http://ec2-54-187-106-212.us-west-2.compute.amazonaws.com/ - SearchActivity - CompassActivity - FoundActivity + Search + Compass + Found Compass Scan Back diff --git a/UNCCScavenger/src/edu/uncc/scavenger/CompassActivity.java b/UNCCScavenger/src/edu/uncc/scavenger/CompassActivity.java index 76f6829..e56f300 100644 --- a/UNCCScavenger/src/edu/uncc/scavenger/CompassActivity.java +++ b/UNCCScavenger/src/edu/uncc/scavenger/CompassActivity.java @@ -36,8 +36,8 @@ import android.widget.Toast; public class CompassActivity extends Activity implements SensorEventListener { final int SEARCH_PROXIMITY = 10; - final int MOVING_AVERAGE_SIZE = 10; - ImageView compassRoseView, arrowView, searchImageView; + final int MOVING_AVERAGE_SIZE = 20; + ImageView arrowView, searchImageView; Button backButton; SensorManager sManager; Sensor aSensor, mSensor; @@ -62,7 +62,6 @@ public class CompassActivity extends Activity implements SensorEventListener restLocation = (RestLocation)(getIntent().getSerializableExtra("restLocation")); arrowView = (ImageView)findViewById(R.id.arrowView); - compassRoseView = (ImageView)findViewById(R.id.compassRoseView); searchImageView = (ImageView)findViewById(R.id.searchImageView); searchImageView.setVisibility(View.INVISIBLE); Bitmap b = BitmapAccess.loadBitmap(this, restLocation.getName()); @@ -174,19 +173,16 @@ public class CompassActivity extends Activity implements SensorEventListener //Rotate compass and arrow. Rotations must be opposite to counteract device movement - compassRoseView.setRotation((long)(-1 * trueHeading)); - arrowView.setRotation((long)(-1 * rotateArrow)); + arrowView.setRotation((long)(-1 * finalRotation)); if(locationListener.getDistance() <= SEARCH_PROXIMITY) { arrowView.setVisibility(View.INVISIBLE); - compassRoseView.setVisibility(View.INVISIBLE); searchImageView.setVisibility(View.VISIBLE); } else { arrowView.setVisibility(View.VISIBLE); - compassRoseView.setVisibility(View.VISIBLE); searchImageView.setVisibility(View.INVISIBLE); } }