Package zendesk.messaging
Class Banner.Builder
- java.lang.Object
-
- zendesk.messaging.Banner.Builder
-
- Enclosing class:
- Banner
public static class Banner.Builder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor and Description Builder(java.lang.String label)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description Banner
build()
Constructs a new instance ofBanner
Banner.Builder
setDuration(Banner.Duration duration)
Sets the duration of how long the banner should be displayed.Banner.Builder
withButtonText(java.lang.String buttonText)
Adds text to the banner button.
-
-
-
Method Detail
-
withButtonText
public Banner.Builder withButtonText(java.lang.String buttonText)
Adds text to the banner button. If no text is present the button is set to {View.GONE}. Button text is null by default.- Parameters:
buttonText
- the text to be displayed on the button.- Returns:
- Builder with the buttonText set
-
setDuration
public Banner.Builder setDuration(Banner.Duration duration)
Sets the duration of how long the banner should be displayed. Banner is set to Short (4000ms) by default. SeeBanner.Duration
for values.- Parameters:
duration
- of the banner- Returns:
- Builder with the duration set
-
-