| java.lang.Object | |
| ↳ | com.urbanairship.iam.banner.BannerDisplayContent.Builder |
Banner Display Content Builder.
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| BannerDisplayContent.Builder |
addAction(String actionName, JsonValue actionValue)
Adds an action to run when the banner is clicked.
| ||||||||||
| BannerDisplayContent.Builder |
addButton(ButtonInfo buttonInfo)
Adds a button to the banner.
| ||||||||||
| BannerDisplayContent |
build()
Builds the banner display content.
| ||||||||||
| BannerDisplayContent.Builder |
setActions(Map<String, JsonValue> actions)
Sets the actions to run when the banner is clicked.
| ||||||||||
| BannerDisplayContent.Builder |
setBackgroundColor(int color)
Sets the background color.
| ||||||||||
| BannerDisplayContent.Builder |
setBody(TextInfo body)
Sets the banner's body.
| ||||||||||
| BannerDisplayContent.Builder |
setBorderRadius(float borderRadius)
Sets the border radius in dps.
| ||||||||||
| BannerDisplayContent.Builder |
setButtonLayout(String buttonLayout)
Sets the button layout.
| ||||||||||
| BannerDisplayContent.Builder |
setButtons(List<ButtonInfo> buttons)
Sets the banner's buttons.
| ||||||||||
| BannerDisplayContent.Builder |
setDismissButtonColor(int color)
Sets the dismiss button color.
| ||||||||||
| BannerDisplayContent.Builder |
setDuration(long duration, TimeUnit timeUnit)
Sets the display duration.
| ||||||||||
| BannerDisplayContent.Builder |
setHeading(TextInfo heading)
Sets the banner's heading.
| ||||||||||
| BannerDisplayContent.Builder |
setMedia(MediaInfo media)
Sets the banner media.
| ||||||||||
| BannerDisplayContent.Builder |
setPlacement(String placement)
Sets the banner's placement.
| ||||||||||
| BannerDisplayContent.Builder |
setTemplate(String template)
Sets the banner's template.
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Adds an action to run when the banner is clicked.
| actionName | The action name. |
|---|---|
| actionValue | The action value. |
Adds a button to the banner. Only 2 buttons are supported.
| buttonInfo | Adds a button to the banner. |
|---|
Builds the banner display content.
| IllegalArgumentException | If more than 2 button are defined, if the supplied media is not an image, or if the banner does not define at least a heading, body, or buttons. |
|---|
Sets the actions to run when the banner is clicked.
| actions | The action map. |
|---|
Sets the background color. Defaults to white.
| color | The background color. |
|---|
Sets the banner's body.
| body | The banner's body. |
|---|
Sets the border radius in dps. Defaults to 0.
| borderRadius | The border radius. |
|---|
Sets the button layout. Defaults to BUTTON_LAYOUT_SEPARATE.
| buttonLayout | The button layout. |
|---|
Sets the banner's buttons. Only 2 buttons are supported.
| buttons | A list of button infos. |
|---|
Sets the dismiss button color. Defaults to black.
| color | The dismiss button color. |
|---|
Sets the display duration. Defaults to DEFAULT_DURATION_MS.
| duration | The duration in milliseconds. |
|---|---|
| timeUnit | The time unit. |
Sets the banner's heading.
| heading | The banner's heading. |
|---|
Sets the banner media. Only TYPE_IMAGE is supported.
| media | The media info. |
|---|
Sets the banner's placement. Defaults to PLACEMENT_BOTTOM.
| placement | The banner's placement. |
|---|
Sets the banner's template. Defaults to TEMPLATE_LEFT_MEDIA.
| template | The banner's template. |
|---|