aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/CompassActivity.java
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/cgeo/geocaching/CompassActivity.java')
-rw-r--r--main/src/cgeo/geocaching/CompassActivity.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/main/src/cgeo/geocaching/CompassActivity.java b/main/src/cgeo/geocaching/CompassActivity.java
index d481d58..912ca5c 100644
--- a/main/src/cgeo/geocaching/CompassActivity.java
+++ b/main/src/cgeo/geocaching/CompassActivity.java
@@ -4,6 +4,7 @@ import butterknife.ButterKnife;
import butterknife.InjectView;
import cgeo.geocaching.activity.AbstractActionBarActivity;
+import cgeo.geocaching.activity.ShowcaseViewBuilder;
import cgeo.geocaching.enumerations.LoadFlags;
import cgeo.geocaching.location.Geopoint;
import cgeo.geocaching.location.Units;
@@ -20,6 +21,8 @@ import cgeo.geocaching.utils.AngleUtils;
import cgeo.geocaching.utils.Formatter;
import cgeo.geocaching.utils.Log;
+import com.github.amlcurran.showcaseview.targets.ActionItemTarget;
+
import org.apache.commons.lang3.StringUtils;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
@@ -103,6 +106,8 @@ public class CompassActivity extends AbstractActionBarActivity {
// make sure we can control the TTS volume
setVolumeControlStream(AudioManager.STREAM_MUSIC);
+
+ presentShowcase();
}
@Override
@@ -226,6 +231,13 @@ public class CompassActivity extends AbstractActionBarActivity {
return super.onOptionsItemSelected(item);
}
+ @Override
+ public ShowcaseViewBuilder getShowcase() {
+ return new ShowcaseViewBuilder(this)
+ .setTarget(new ActionItemTarget(this, R.id.menu_hint))
+ .setContent(R.string.showcase_compass_hint_title, R.string.showcase_compass_hint_text);
+ }
+
private void setTarget(@NonNull final Geopoint coords, final String newDescription) {
setDestCoords(coords);
setTargetDescription(newDescription);