From 5ad5cb4a000597612927a8e2315b9a078737ad38 Mon Sep 17 00:00:00 2001 From: Ricky Barrette Date: Tue, 7 Aug 2012 12:20:54 -0400 Subject: [PATCH] Numerical Indicator For location radius closes #136 Signed-off-by: Ricky Barrette --- LocationRinger/AndroidManifest.xml | 4 ++-- LocationRinger/project.properties | 2 +- LocationRinger/res/layout/map_info_fragment.xml | 9 +++++++++ .../ui/fragments/LocationInfomationFragment.java | 5 +++++ 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/LocationRinger/AndroidManifest.xml b/LocationRinger/AndroidManifest.xml index 864586e..ced47e5 100644 --- a/LocationRinger/AndroidManifest.xml +++ b/LocationRinger/AndroidManifest.xml @@ -2,8 +2,8 @@ + android:versionCode="137" + android:versionName="fc8952e" > diff --git a/LocationRinger/project.properties b/LocationRinger/project.properties index 3424666..dd39243 100644 --- a/LocationRinger/project.properties +++ b/LocationRinger/project.properties @@ -9,7 +9,7 @@ android.library.reference.1=../../exception_handler_library/ExceptionHandlerLib android.library.reference.2=../../location_library/LocationLib -proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard.cfg +#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard.cfg # Project target. target=Google Inc.:Google APIs:16 diff --git a/LocationRinger/res/layout/map_info_fragment.xml b/LocationRinger/res/layout/map_info_fragment.xml index c73be03..48677c7 100644 --- a/LocationRinger/res/layout/map_info_fragment.xml +++ b/LocationRinger/res/layout/map_info_fragment.xml @@ -56,4 +56,13 @@ class="com.TwentyCodes.android.LocationRinger.ui.fragments.MapFragment" > + + \ No newline at end of file diff --git a/LocationRinger/src/com/TwentyCodes/android/LocationRinger/ui/fragments/LocationInfomationFragment.java b/LocationRinger/src/com/TwentyCodes/android/LocationRinger/ui/fragments/LocationInfomationFragment.java index f497187..ec27b24 100644 --- a/LocationRinger/src/com/TwentyCodes/android/LocationRinger/ui/fragments/LocationInfomationFragment.java +++ b/LocationRinger/src/com/TwentyCodes/android/LocationRinger/ui/fragments/LocationInfomationFragment.java @@ -19,6 +19,7 @@ import android.widget.CompoundButton; import android.widget.CompoundButton.OnCheckedChangeListener; import android.widget.SeekBar; import android.widget.SeekBar.OnSeekBarChangeListener; +import android.widget.TextView; import android.widget.Toast; import android.widget.ToggleButton; @@ -31,6 +32,7 @@ import com.TwentyCodes.android.LocationRinger.debug.Debug; import com.TwentyCodes.android.LocationRinger.ui.SearchDialog; import com.TwentyCodes.android.location.AndroidGPS; import com.TwentyCodes.android.location.GeoPointLocationListener; +import com.TwentyCodes.android.location.GeoUtils; import com.TwentyCodes.android.location.OnLocationSelectedListener; import com.TwentyCodes.android.overlays.RadiusOverlay; import com.google.android.maps.GeoPoint; @@ -56,6 +58,7 @@ public class LocationInfomationFragment extends Fragment implements GeoPointLoca private GeoPoint mPoint; private AndroidGPS mGPS; private View view; + private TextView mRadiusTextView; /** * Creates a new MapFragment @@ -130,6 +133,7 @@ public class LocationInfomationFragment extends Fragment implements GeoPointLoca mMap = (MapFragment) getFragmentManager().findFragmentById(R.id.mapview); mRadius = (SeekBar) view.findViewById(R.id.radius); + mRadiusTextView = (TextView) view.findViewById(R.id.radius_textview); mRadius.setMax(Debug.MAX_RADIUS_IN_METERS); mMap.setClickable(false); mMapEditToggle = (ToggleButton) view.findViewById(R.id.map_edit_toggle); @@ -245,6 +249,7 @@ public class LocationInfomationFragment extends Fragment implements GeoPointLoca public void onProgressChanged(final SeekBar seekBar, final int progress, final boolean fromUser) { switch (seekBar.getId()) { case R.id.radius: + mRadiusTextView.setText(GeoUtils.distanceToString((Float.valueOf(progress) / 1000) , true)); mRadiusOverlay.setRadius(progress); mMap.invalidate(); if (mListener != null) {