change the size of showcase circle
is it possible to change the size of showcase circle? I mean the focus area? thanks...
MaterialShowcaseView.Builder has following two functions:
builder.setUseAutoRadius(false);
builder.setRadius(radius);
Use those in combination to achieve what you want
thanks :) but what about in sequence mode?
use the addSequenceItem(MaterialShowcaseView sequenceItem) function and create MaterialShowcaseView manually...
ShowcaseConfig config = new ShowcaseConfig(); config.setDelay(1000); MaterialShowcaseSequence sequence = new MaterialShowcaseSequence(MainActivity.this, "2"); sequence.setConfig(config); sequence.addSequenceItem(btnCloseRevealSearch, closeDescription, okDescription); sequence.addSequenceItem(btnOpenRevealSearch, searchDescription, okDescription); sequence.start();
I'm sorry! how to set the setRadius in this code I mean?
Here's my example function I use:
private static MaterialShowcaseView create(Activity activity, View view, int content, String id, Integer radius)
{
MaterialShowcaseView.Builder builder = new MaterialShowcaseView.Builder(activity)
.setTarget(view)
//.setDismissText(button)
//.setDismissTextColor(Tools.getThemeColor(activity, R.attr.colorPrimary))
.setMaskColour(Color.argb(150, 0, 0, 0))
.setContentText(content)
.setDismissOnTouch(true)
.setDelay(0); // optional but starting animations immediately in onCreate can make them choppy
if (radius != null)
{
builder.setUseAutoRadius(false);
builder.setRadius(radius);
}
else
builder.setUseAutoRadius(true);
if (id != null)
builder.singleUse(id); // provide a unique ID used to ensure it is only shown once
MaterialShowcaseView showcaseView = builder.build();
return showcaseView;
}
Use it like following:
sequence.addSequenceItem(create(...));
thanks a ton...
config.setShapePadding(60 //your prepared size);