diff --git a/onebusaway-android/src/main/java/org/onebusaway/android/ui/ArrivalsListActivity.java b/onebusaway-android/src/main/java/org/onebusaway/android/ui/ArrivalsListActivity.java index 5558a8dc2..7e33aa5bb 100644 --- a/onebusaway-android/src/main/java/org/onebusaway/android/ui/ArrivalsListActivity.java +++ b/onebusaway-android/src/main/java/org/onebusaway/android/ui/ArrivalsListActivity.java @@ -20,6 +20,7 @@ import org.onebusaway.android.io.elements.ObaStop; import org.onebusaway.android.provider.ObaContract; import org.onebusaway.android.util.FragmentUtils; +import org.onebusaway.android.util.ShowcaseViewUtils; import org.onebusaway.android.util.UIUtils; import android.content.Context; @@ -170,6 +171,12 @@ protected void onResume() { } } + @Override + protected void onPause() { + ShowcaseViewUtils.hideShowcaseView(); + super.onPause(); + } + @Override protected void onStart() { ObaAnalytics.reportActivityStart(this); diff --git a/onebusaway-android/src/main/java/org/onebusaway/android/ui/HomeActivity.java b/onebusaway-android/src/main/java/org/onebusaway/android/ui/HomeActivity.java index 61641bd08..e755693e6 100644 --- a/onebusaway-android/src/main/java/org/onebusaway/android/ui/HomeActivity.java +++ b/onebusaway-android/src/main/java/org/onebusaway/android/ui/HomeActivity.java @@ -327,6 +327,12 @@ public void onResume() { } } + @Override + protected void onPause() { + ShowcaseViewUtils.hideShowcaseView(); + super.onPause(); + } + @Override public void onStop() { // Tear down GoogleApiClient diff --git a/onebusaway-android/src/main/java/org/onebusaway/android/util/ShowcaseViewUtils.java b/onebusaway-android/src/main/java/org/onebusaway/android/util/ShowcaseViewUtils.java index 33e19044c..a87c061a4 100644 --- a/onebusaway-android/src/main/java/org/onebusaway/android/util/ShowcaseViewUtils.java +++ b/onebusaway-android/src/main/java/org/onebusaway/android/util/ShowcaseViewUtils.java @@ -315,6 +315,15 @@ public static boolean isShowcaseViewShowing() { return mShowcaseView != null && mShowcaseView.isShowing(); } + /** + * Hides a currently showing ShowcaseView + */ + public static void hideShowcaseView() { + if (mShowcaseView != null) { + mShowcaseView.hide(); + } + } + /** * Adds the provided icon to the right side of the provided SpannableString *