@@ -83,6 +83,7 @@ public class ShowcaseView extends RelativeLayout
83
83
private boolean isShowing ;
84
84
private int backgroundColor ;
85
85
private int showcaseColor ;
86
+ private boolean blockAllTouches ;
86
87
87
88
protected ShowcaseView (Context context , boolean newStyle ) {
88
89
this (context , null , R .styleable .CustomTheme_showcaseViewStyle , newStyle );
@@ -340,6 +341,9 @@ public void onAnimationStart() {
340
341
341
342
@ Override
342
343
public boolean onTouch (View view , MotionEvent motionEvent ) {
344
+ if (blockAllTouches ) {
345
+ return true ;
346
+ }
343
347
344
348
float xDelta = Math .abs (motionEvent .getRawX () - showcaseX );
345
349
float yDelta = Math .abs (motionEvent .getRawY () - showcaseY );
@@ -593,6 +597,15 @@ public Builder replaceEndButton(int buttonResourceId) {
593
597
}
594
598
return replaceEndButton ((Button ) view );
595
599
}
600
+
601
+ /**
602
+ * Block any touch made on the ShowcaseView, even inside the showcase
603
+ */
604
+ public Builder blockAllTouches () {
605
+ showcaseView .setBlockAllTouches (true );
606
+ return this ;
607
+ }
608
+
596
609
}
597
610
598
611
private void setEndButton (Button button ) {
@@ -700,6 +713,10 @@ public void setBlocksTouches(boolean blockTouches) {
700
713
this .blockTouches = blockTouches ;
701
714
}
702
715
716
+ private void setBlockAllTouches (boolean blockAllTouches ) {
717
+ this .blockAllTouches = blockAllTouches ;
718
+ }
719
+
703
720
/**
704
721
* @see com.github.amlcurran.showcaseview.ShowcaseView.Builder#setStyle(int)
705
722
*/
0 commit comments