Numerical Indicator For location radius
closes #136 Signed-off-by: Ricky Barrette <rickbarrette@gmail.com>
This commit is contained in:
@@ -2,8 +2,8 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.TwentyCodes.android.LocationRinger"
|
package="com.TwentyCodes.android.LocationRinger"
|
||||||
android:installLocation="internalOnly"
|
android:installLocation="internalOnly"
|
||||||
android:versionCode="121"
|
android:versionCode="137"
|
||||||
android:versionName="a664e0a" >
|
android:versionName="fc8952e" >
|
||||||
|
|
||||||
<uses-sdk android:minSdkVersion="7"/>
|
<uses-sdk android:minSdkVersion="7"/>
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
android.library.reference.1=../../exception_handler_library/ExceptionHandlerLib
|
android.library.reference.1=../../exception_handler_library/ExceptionHandlerLib
|
||||||
android.library.reference.2=../../location_library/LocationLib
|
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.
|
# Project target.
|
||||||
target=Google Inc.:Google APIs:16
|
target=Google Inc.:Google APIs:16
|
||||||
|
|
||||||
|
|||||||
@@ -56,4 +56,13 @@
|
|||||||
class="com.TwentyCodes.android.LocationRinger.ui.fragments.MapFragment" >
|
class="com.TwentyCodes.android.LocationRinger.ui.fragments.MapFragment" >
|
||||||
</fragment>
|
</fragment>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/radius_textview"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_alignTop="@+id/mapview"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||||
|
android:textColor="#ff0000" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
@@ -19,6 +19,7 @@ import android.widget.CompoundButton;
|
|||||||
import android.widget.CompoundButton.OnCheckedChangeListener;
|
import android.widget.CompoundButton.OnCheckedChangeListener;
|
||||||
import android.widget.SeekBar;
|
import android.widget.SeekBar;
|
||||||
import android.widget.SeekBar.OnSeekBarChangeListener;
|
import android.widget.SeekBar.OnSeekBarChangeListener;
|
||||||
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
import android.widget.ToggleButton;
|
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.LocationRinger.ui.SearchDialog;
|
||||||
import com.TwentyCodes.android.location.AndroidGPS;
|
import com.TwentyCodes.android.location.AndroidGPS;
|
||||||
import com.TwentyCodes.android.location.GeoPointLocationListener;
|
import com.TwentyCodes.android.location.GeoPointLocationListener;
|
||||||
|
import com.TwentyCodes.android.location.GeoUtils;
|
||||||
import com.TwentyCodes.android.location.OnLocationSelectedListener;
|
import com.TwentyCodes.android.location.OnLocationSelectedListener;
|
||||||
import com.TwentyCodes.android.overlays.RadiusOverlay;
|
import com.TwentyCodes.android.overlays.RadiusOverlay;
|
||||||
import com.google.android.maps.GeoPoint;
|
import com.google.android.maps.GeoPoint;
|
||||||
@@ -56,6 +58,7 @@ public class LocationInfomationFragment extends Fragment implements GeoPointLoca
|
|||||||
private GeoPoint mPoint;
|
private GeoPoint mPoint;
|
||||||
private AndroidGPS mGPS;
|
private AndroidGPS mGPS;
|
||||||
private View view;
|
private View view;
|
||||||
|
private TextView mRadiusTextView;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new MapFragment
|
* Creates a new MapFragment
|
||||||
@@ -130,6 +133,7 @@ public class LocationInfomationFragment extends Fragment implements GeoPointLoca
|
|||||||
|
|
||||||
mMap = (MapFragment) getFragmentManager().findFragmentById(R.id.mapview);
|
mMap = (MapFragment) getFragmentManager().findFragmentById(R.id.mapview);
|
||||||
mRadius = (SeekBar) view.findViewById(R.id.radius);
|
mRadius = (SeekBar) view.findViewById(R.id.radius);
|
||||||
|
mRadiusTextView = (TextView) view.findViewById(R.id.radius_textview);
|
||||||
mRadius.setMax(Debug.MAX_RADIUS_IN_METERS);
|
mRadius.setMax(Debug.MAX_RADIUS_IN_METERS);
|
||||||
mMap.setClickable(false);
|
mMap.setClickable(false);
|
||||||
mMapEditToggle = (ToggleButton) view.findViewById(R.id.map_edit_toggle);
|
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) {
|
public void onProgressChanged(final SeekBar seekBar, final int progress, final boolean fromUser) {
|
||||||
switch (seekBar.getId()) {
|
switch (seekBar.getId()) {
|
||||||
case R.id.radius:
|
case R.id.radius:
|
||||||
|
mRadiusTextView.setText(GeoUtils.distanceToString((Float.valueOf(progress) / 1000) , true));
|
||||||
mRadiusOverlay.setRadius(progress);
|
mRadiusOverlay.setRadius(progress);
|
||||||
mMap.invalidate();
|
mMap.invalidate();
|
||||||
if (mListener != null) {
|
if (mListener != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user