diff --git a/library/src/main/java/uk/co/samuelwall/materialtaptargetprompt/MaterialTapTargetPrompt.java b/library/src/main/java/uk/co/samuelwall/materialtaptargetprompt/MaterialTapTargetPrompt.java index 882c8d31865f4b50648751d4868d21625da31ff9..95cf49ccf9e716c93da3f7e873ab02bad7a7dbfe 100644 --- a/library/src/main/java/uk/co/samuelwall/materialtaptargetprompt/MaterialTapTargetPrompt.java +++ b/library/src/main/java/uk/co/samuelwall/materialtaptargetprompt/MaterialTapTargetPrompt.java @@ -588,6 +588,10 @@ public class MaterialTapTargetPrompt { mView.mPromptOptions.getPromptText().update(revealModifier, alphaModifier); if (mView.mIconDrawable != null) { mView.mIconDrawable.setAlpha(alphaModifier); + mView.mIconDrawable.setWidth( + (int)(mView.mPromptOptions.getTargetView().getWidth() * alphaModifier)); + mView.mIconDrawable.setHeight( + (int)(mView.mPromptOptions.getTargetView().getHeight() * alphaModifier)); } mView.mPromptOptions.getPromptFocal().update(revealModifier, alphaModifier); mView.mPromptOptions.getPromptBackground().update(revealModifier, alphaModifier); @@ -786,10 +790,12 @@ public class MaterialTapTargetPrompt { public boolean onTouchEvent(Component component, TouchEvent event) { final float xx = event.getPointerPosition(event.getIndex()).getX(); final float yy = event.getPointerPosition(event.getIndex()).getY(); + // If the touch point is within the prompt background stop the event from passing through it boolean captureEvent = (!isClipToBounds || mClipBounds.isInclude((int) xx, (int) yy)) && mPromptOptions.getPromptBackground().contains(xx, yy); setClickedListener(null); + // If the touch event was at least in the background and in the focal if (captureEvent && mPromptOptions.getPromptFocal().contains(xx, yy)) { // Override allowing the touch event to pass through the view with the user defined value