From bbc713d01b655870ffdd35941bdd0b3395e09210 Mon Sep 17 00:00:00 2001 From: campbeb Date: Sat, 2 Jun 2012 18:21:19 +0900 Subject: Display cache and waypoint information on compass For caches: displays difficulty, terrain, and size. For waypoints: displays waypoint type. For direct navigation: displays nothing. Also includes some refactoring in the code used do display information about caches and waypoints. --- main/src/cgeo/geocaching/apps/cache/navi/CompassApp.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'main/src/cgeo/geocaching/apps/cache') diff --git a/main/src/cgeo/geocaching/apps/cache/navi/CompassApp.java b/main/src/cgeo/geocaching/apps/cache/navi/CompassApp.java index da3d5f9..5275d53 100644 --- a/main/src/cgeo/geocaching/apps/cache/navi/CompassApp.java +++ b/main/src/cgeo/geocaching/apps/cache/navi/CompassApp.java @@ -6,6 +6,7 @@ import cgeo.geocaching.cgWaypoint; import cgeo.geocaching.cgeonavigate; import cgeo.geocaching.apps.AbstractApp; import cgeo.geocaching.geopoint.Geopoint; +import cgeo.geocaching.ui.Formatter; import android.app.Activity; @@ -27,7 +28,8 @@ class CompassApp extends AbstractApp implements CacheNavigationApp, WaypointNavi @Override public void navigate(Activity activity, cgWaypoint waypoint) { - cgeonavigate.startActivity(activity, waypoint.getPrefix() + "/" + waypoint.getLookup(), waypoint.getName(), waypoint.getCoords(), null); + cgeonavigate.startActivity(activity, waypoint.getPrefix() + "/" + waypoint.getLookup(), waypoint.getName(), waypoint.getCoords(), null, + waypoint.getWaypointType().getL10n()); } @Override @@ -37,7 +39,8 @@ class CompassApp extends AbstractApp implements CacheNavigationApp, WaypointNavi @Override public void navigate(Activity activity, cgCache cache) { - cgeonavigate.startActivity(activity, cache.getGeocode(), cache.getName(), cache.getCoords(), null); + cgeonavigate.startActivity(activity, cache.getGeocode(), cache.getName(), cache.getCoords(), null, + Formatter.formatCacheInfoShort(cache)); } @Override -- cgit v1.1