public static class

FullScreenDisplayContent.Builder

extends Object
java.lang.Object
   ↳ com.urbanairship.iam.fullscreen.FullScreenDisplayContent.Builder

Class Overview

Display Content Builder.

Summary

Public Methods
FullScreenDisplayContent.Builder addButton(ButtonInfo buttonInfo)
Adds a button the button info.
FullScreenDisplayContent build()
Builds the full screen display content.
FullScreenDisplayContent.Builder setBackgroundColor(int color)
Sets the background color.
FullScreenDisplayContent.Builder setBody(TextInfo body)
Sets the message's body.
FullScreenDisplayContent.Builder setButtonLayout(String buttonLayout)
Sets the button layout.
FullScreenDisplayContent.Builder setButtons(List<ButtonInfo> buttons)
Sets the message's buttons.
FullScreenDisplayContent.Builder setDismissButtonColor(int color)
Sets the dismiss button color.
FullScreenDisplayContent.Builder setFooter(ButtonInfo footer)
Sets the footer button.
FullScreenDisplayContent.Builder setHeading(TextInfo heading)
Sets the message's heading.
FullScreenDisplayContent.Builder setMedia(MediaInfo media)
Sets the media.
FullScreenDisplayContent.Builder setTemplate(String template)
Sets the template.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public FullScreenDisplayContent.Builder addButton (ButtonInfo buttonInfo)

Adds a button the button info. Max of 5 buttons are supported. If more than 2 buttons are supplied, button layout will default to stacked.

Parameters
buttonInfo Adds a button to the message.
Returns
  • The builder instance.

public FullScreenDisplayContent build ()

Builds the full screen display content.

Returns
  • The full screen display content.
Throws
IllegalArgumentException If more than 5 buttons are defined, or if the heading and body are both missing.

public FullScreenDisplayContent.Builder setBackgroundColor (int color)

Sets the background color. Defaults to white.

Parameters
color The background color.
Returns
  • The builder instance.

public FullScreenDisplayContent.Builder setBody (TextInfo body)

Sets the message's body.

Parameters
body The message's body.
Returns
  • The builder instance.

public FullScreenDisplayContent.Builder setButtonLayout (String buttonLayout)

Sets the button layout. If more than 2 buttons are supplied, the layout will default to BUTTON_LAYOUT_STACKED.

Parameters
buttonLayout The button layout.
Returns
  • The builder instance.

public FullScreenDisplayContent.Builder setButtons (List<ButtonInfo> buttons)

Sets the message's buttons. Max of 5 buttons are supported. If more than 2 buttons are supplied, button layout will default to stacked.

Parameters
buttons A list of button infos.
Returns
  • The builder instance.

public FullScreenDisplayContent.Builder setDismissButtonColor (int color)

Sets the dismiss button color. Defaults to black.

Parameters
color The dismiss button color.
Returns
  • The builder instance.

public FullScreenDisplayContent.Builder setFooter (ButtonInfo footer)

Sets the footer button.

Parameters
footer The footer button info.
Returns
  • The builder instance.

public FullScreenDisplayContent.Builder setHeading (TextInfo heading)

Sets the message's heading.

Parameters
heading The message's heading.
Returns
  • The builder instance.

public FullScreenDisplayContent.Builder setMedia (MediaInfo media)

Sets the media.

Parameters
media The media info.
Returns
  • The builder instance.

public FullScreenDisplayContent.Builder setTemplate (String template)

Sets the template. Defaults to TEMPLATE_HEADER_MEDIA_BODY.

Parameters
template The message's template.
Returns
  • The builder instance.