amlcurran / ShowcaseView

[Archived] Highlight the best bits of your app to users quickly, simply, and cool...ly
5.6k stars 1.29k forks source link

Change showcase form #421

Open mrkiwi opened 7 years ago

mrkiwi commented 7 years ago

Hello. Is there any way to change the form of showcase? We have circle as default form, but I need rectangle to show the textview element. I tried to implement ShowcaseDrawer and create a custom showcaseview but the showcase not displays correctly - background overlaps showcase. Here is my code: public CustomShowcaseView(Resources resources) { width = resources.getDimension(R.dimen.custom_showcase_width); height = resources.getDimension(R.dimen.custom_showcase_height); PorterDuffXfermode xfermode = new PorterDuffXfermode(PorterDuff.Mode.MULTIPLY); eraserPaint = new Paint(); eraserPaint.setColor(0xFFFFFF); eraserPaint.setAlpha(0); eraserPaint.setXfermode(xfermode); eraserPaint.setAntiAlias(true); eraseColour = resources.getColor(R.color.custom_showcase_bg); basicPaint = new Paint(); renderRect = new RectF(); } I would be grateful for any help.

nadia-am commented 6 years ago

you can but making custom showcaseDrawer. you can follow the example and CustomShowcaseActivity file which is an example of defining rectangle instead of circle. https://github.com/amlcurran/ShowcaseView/blob/master/sample/src/main/java/com/github/amlcurran/showcaseview/sample/CustomShowcaseActivity.java