diff options
author | Bananeweizen <bananeweizen@gmx.de> | 2015-02-11 23:16:55 +0100 |
---|---|---|
committer | Bananeweizen <bananeweizen@gmx.de> | 2015-02-11 23:16:55 +0100 |
commit | 80bf4445722190f96c1a017efc2e841ce33d4d45 (patch) | |
tree | fab84b9058e0f5a21a9bd73f03416a298a73eccc /main/src/cgeo/geocaching/maps/CGeoMap.java | |
parent | aa122b88b6c1865be4d441ad02329bb7ae8b6c0d (diff) | |
download | cgeo-80bf4445722190f96c1a017efc2e841ce33d4d45.zip cgeo-80bf4445722190f96c1a017efc2e841ce33d4d45.tar.gz cgeo-80bf4445722190f96c1a017efc2e841ce33d4d45.tar.bz2 |
new: show hint in compass and map
Diffstat (limited to 'main/src/cgeo/geocaching/maps/CGeoMap.java')
-rw-r--r-- | main/src/cgeo/geocaching/maps/CGeoMap.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/main/src/cgeo/geocaching/maps/CGeoMap.java b/main/src/cgeo/geocaching/maps/CGeoMap.java index 70d8bb8..467a02f 100644 --- a/main/src/cgeo/geocaching/maps/CGeoMap.java +++ b/main/src/cgeo/geocaching/maps/CGeoMap.java @@ -682,6 +682,7 @@ public class CGeoMap extends AbstractMap implements ViewFactory { default: // DETAILED menu.findItem(R.id.menu_strategy_detailed).setChecked(true); } + menu.findItem(R.id.menu_hint).setVisible(mapMode == MapMode.SINGLE); } catch (final RuntimeException e) { Log.e("CGeoMap.onPrepareOptionsMenu", e); } @@ -785,6 +786,12 @@ public class CGeoMap extends AbstractMap implements ViewFactory { Settings.setLiveMapStrategy(Strategy.DETAILED); return true; } + case R.id.menu_hint: + if (caches.size() == 1) { + final String hint = caches.iterator().next().getHint(); + ActivityMixin.showToast(getActivity(), StringUtils.defaultString(hint, getActivity().getString(R.string.cache_hint_not_available))); + } + return true; default: final MapSource mapSource = MapProviderFactory.getMapSource(id); if (mapSource != null) { |