public static class ShowcaseView.Builder extends Object
ShowcaseViews.
It is recommended that you use this Builder class.| Constructor and Description |
|---|
ShowcaseView.Builder(android.app.Activity activity) |
ShowcaseView.Builder(android.app.Activity activity,
boolean useNewStyle)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
ShowcaseView.Builder |
blockAllTouches()
Block any touch made on the ShowcaseView, even inside the showcase
|
ShowcaseView |
build()
Create the
ShowcaseView and show it. |
ShowcaseView.Builder |
doNotBlockTouches()
Don't make the ShowcaseView block touches on itself.
|
ShowcaseView.Builder |
hideOnTouchOutside()
Make this ShowcaseView hide when the user touches outside the showcased area.
|
ShowcaseView.Builder |
replaceEndButton(android.widget.Button button)
Replace the end button with the one provided.
|
ShowcaseView.Builder |
replaceEndButton(int buttonResourceId)
Replace the end button with the one provided.
|
ShowcaseView.Builder |
setContentText(CharSequence text)
Set the descriptive text shown on the ShowcaseView.
|
ShowcaseView.Builder |
setContentText(int resId)
Set the descriptive text shown on the ShowcaseView.
|
ShowcaseView.Builder |
setContentTextPaint(android.text.TextPaint textPaint)
Sets the paint that will draw the text as specified by
setContentText(CharSequence)
or setContentText(int). |
ShowcaseView.Builder |
setContentTitle(CharSequence title)
Set the title text shown on the ShowcaseView.
|
ShowcaseView.Builder |
setContentTitle(int resId)
Set the title text shown on the ShowcaseView.
|
ShowcaseView.Builder |
setContentTitlePaint(android.text.TextPaint textPaint)
Sets the paint that will draw the text as specified by
setContentTitle(CharSequence)
or setContentTitle(int). |
ShowcaseView.Builder |
setOnClickListener(android.view.View.OnClickListener onClickListener)
Set a listener which will override the button clicks.
|
ShowcaseView.Builder |
setParent(android.view.ViewGroup parent,
int index) |
ShowcaseView.Builder |
setShowcaseDrawer(ShowcaseDrawer showcaseDrawer)
Set a custom showcase drawer which will be responsible for measuring and drawing the showcase
|
ShowcaseView.Builder |
setShowcaseEventListener(OnShowcaseEventListener showcaseEventListener) |
ShowcaseView.Builder |
setStyle(int theme)
Set the style of the ShowcaseView.
|
ShowcaseView.Builder |
setTarget(Target target)
Set the target of the showcase.
|
ShowcaseView.Builder |
singleShot(long shotId)
Set the ShowcaseView to only ever show once.
|
ShowcaseView.Builder |
useDecorViewAsParent()
Uses the android decor view to insert a showcase, this is not recommended
as then UI elements in showcase view can hide behind the nav bar
|
ShowcaseView.Builder |
withHoloShowcase()
Draw a holo-style showcase.
|
ShowcaseView.Builder |
withMaterialShowcase()
Draw a material style showcase.
|
ShowcaseView.Builder |
withNewStyleShowcase()
Draw a new-style showcase.
![]() |
public ShowcaseView.Builder(android.app.Activity activity)
@Deprecated public ShowcaseView.Builder(android.app.Activity activity, boolean useNewStyle)
useNewStyle - should use "new style" showcase (see withNewStyleShowcase()public ShowcaseView build()
ShowcaseView and show it.public ShowcaseView.Builder withHoloShowcase()

public ShowcaseView.Builder withNewStyleShowcase()

public ShowcaseView.Builder withMaterialShowcase()

public ShowcaseView.Builder setShowcaseDrawer(ShowcaseDrawer showcaseDrawer)
public ShowcaseView.Builder setContentTitle(int resId)
public ShowcaseView.Builder setContentTitle(CharSequence title)
public ShowcaseView.Builder setContentText(int resId)
public ShowcaseView.Builder setContentText(CharSequence text)
public ShowcaseView.Builder setTarget(Target target)
target - a Target representing
the item to showcase (e.g., a button, or action item).public ShowcaseView.Builder setStyle(int theme)
public ShowcaseView.Builder setOnClickListener(android.view.View.OnClickListener onClickListener)
public ShowcaseView.Builder doNotBlockTouches()
public ShowcaseView.Builder hideOnTouchOutside()
doNotBlockTouches() as well.
By default, the ShowcaseView doesn't hide on touch.public ShowcaseView.Builder singleShot(long shotId)
shotId - a unique identifier (across the app) to store
whether this ShowcaseView has been shown.public ShowcaseView.Builder setShowcaseEventListener(OnShowcaseEventListener showcaseEventListener)
public ShowcaseView.Builder setParent(android.view.ViewGroup parent, int index)
public ShowcaseView.Builder setContentTextPaint(android.text.TextPaint textPaint)
setContentText(CharSequence)
or setContentText(int). If you're using a TextAppearance (set by setStyle(int),
then this TextPaint will override that TextAppearance.public ShowcaseView.Builder setContentTitlePaint(android.text.TextPaint textPaint)
setContentTitle(CharSequence)
or setContentTitle(int). If you're using a TextAppearance (set by setStyle(int),
then this TextPaint will override that TextAppearance.public ShowcaseView.Builder replaceEndButton(android.widget.Button button)
View.setOnClickListener(OnClickListener), so call this method before that one.public ShowcaseView.Builder replaceEndButton(int buttonResourceId)
View.setOnClickListener(OnClickListener), so call this method before that one.public ShowcaseView.Builder blockAllTouches()
public ShowcaseView.Builder useDecorViewAsParent()