From 6a6d58bbdab8539e687442fb44c5dc42a6ca2269 Mon Sep 17 00:00:00 2001 From: Satyarth Sampath Date: Thu, 4 Aug 2016 15:57:51 +0530 Subject: [PATCH] backpress dismiss is independent of on touch listener --- .../src/main/java/com/wooplr/spotlight/SpotlightView.java | 3 --- app/src/main/java/com/example/spotlight/MainActivity.java | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/Spotlight-library/src/main/java/com/wooplr/spotlight/SpotlightView.java b/Spotlight-library/src/main/java/com/wooplr/spotlight/SpotlightView.java index d61a622..2b32d73 100755 --- a/Spotlight-library/src/main/java/com/wooplr/spotlight/SpotlightView.java +++ b/Spotlight-library/src/main/java/com/wooplr/spotlight/SpotlightView.java @@ -598,8 +598,6 @@ public void onAnimationStart(Animation animation) { @Override public void onAnimationEnd(Animation animation) { dismissOnTouch = true; - dismissOnBackPress = true; - enableDismissOnBackPress(); } @Override @@ -1027,7 +1025,6 @@ public Builder lineAnimDuration(long duration) { public Builder enableDismissAfterShown(boolean enable) { if (enable) { spotlightView.setDismissOnTouch(false); - spotlightView.setDismissOnBackPress(false); } return this; } diff --git a/app/src/main/java/com/example/spotlight/MainActivity.java b/app/src/main/java/com/example/spotlight/MainActivity.java index e18a339..9daf9f8 100644 --- a/app/src/main/java/com/example/spotlight/MainActivity.java +++ b/app/src/main/java/com/example/spotlight/MainActivity.java @@ -130,7 +130,7 @@ private void showIntro(View view, String usageId) { .lineAndArcColor(Color.parseColor("#eb273f")) .dismissOnTouch(true) .dismissOnBackPress(true) - //.enableDismissAfterShown(true) + .enableDismissAfterShown(true) .usageId(usageId) //UNIQUE ID .show(); }