IntroductoryOverlay.Builder

public static class IntroductoryOverlay.Builder extends Object

The builder class that creates an instance of IntroductoryOverlay.

XML Attribute Summary

Public Constructor Summary

Builder(Activity activity, MenuItem menuItem)
The constructor for the Builder class.
Builder(Activity activity, MediaRouteButton button)
The constructor for the Builder class.

Public Method Summary

IntroductoryOverlay
IntroductoryOverlay.Builder
setButtonText(String text)
Sets the text used in the confirmation button on this overlay.
IntroductoryOverlay.Builder
setButtonText(int stringId)
Sets the text used in the confirmation button on this overlay.
IntroductoryOverlay.Builder
setFocusRadius(float radius)
Sets the radius of the "hole" around the cast button.
IntroductoryOverlay.Builder
setFocusRadiusId(int radiusId)
Sets the radius of the "hole" around the cast button.
IntroductoryOverlay.Builder
setOnOverlayDismissedListener(IntroductoryOverlay.OnOverlayDismissedListener listener)
Sets an IntroductoryOverlay.OnOverlayDismissedListener listener that will be notified when the overlay is dismissed by pressing on the confirmation button.
IntroductoryOverlay.Builder
setOverlayColor(int colorId)
Sets the background color of the overlay view.
IntroductoryOverlay.Builder
setSingleTime()
Sets the maximum number of times that this overlay should be shown to 1.
IntroductoryOverlay.Builder
setTitleText(int stringId)
Sets the text used in the Title area on the overlay.
IntroductoryOverlay.Builder
setTitleText(String text)
Sets the text used in the Title area on the overlay.

Inherited Method Summary

XML Attributes

CastIntroOverlay_castBackgroundColor

CastIntroOverlay_castFocusRadius

Public Constructors

public Builder (Activity activity, MenuItem menuItem)

The constructor for the Builder class.

Parameters
activity The Activity that is showing the overlay view.
menuItem The MenuItem referencing the Cast button that the overlay should focus on.

public Builder (Activity activity, MediaRouteButton button)

The constructor for the Builder class.

Parameters
activity The Activity that is showing the overlay view.
button The MediaRouteButton that the overlay should focus on.

Public Methods

public IntroductoryOverlay build ()

public IntroductoryOverlay.Builder setButtonText (String text)

Sets the text used in the confirmation button on this overlay. This will override the value specified in the resource file and is optional. This is only used on older APIs prior to JELLY_BEAN.

Parameters
text The text string used in the confirmation button.

public IntroductoryOverlay.Builder setButtonText (int stringId)

Sets the text used in the confirmation button on this overlay. This will override the value specified in the resource file and is optional. This is only used on older APIs prior to JELLY_BEAN.

Parameters
stringId The resource ID of the text string used in the confirmation button.

public IntroductoryOverlay.Builder setFocusRadius (float radius)

Sets the radius of the "hole" around the cast button. This will override the value specified in the resource file and is optional. This is only used on older APIs prior to JELLY_BEAN.

Parameters
radius The radius of the "hole".

public IntroductoryOverlay.Builder setFocusRadiusId (int radiusId)

Sets the radius of the "hole" around the cast button. This will override the value specified in the resource file and is optional. This is only used on older APIs prior to JELLY_BEAN.

Parameters
radiusId The resource ID of the radius of the "hole".

public IntroductoryOverlay.Builder setOnOverlayDismissedListener (IntroductoryOverlay.OnOverlayDismissedListener listener)

Sets an IntroductoryOverlay.OnOverlayDismissedListener listener that will be notified when the overlay is dismissed by pressing on the confirmation button.

Parameters
listener The IntroductoryOverlay.OnOverlayDismissedListener instance.

public IntroductoryOverlay.Builder setOverlayColor (int colorId)

Sets the background color of the overlay view. This will override the value that is provided in the style resource file and is optional.

Parameters
colorId The resource ID of the background color.

public IntroductoryOverlay.Builder setSingleTime ()

Sets the maximum number of times that this overlay should be shown to 1. If it is needed to show this more than once, management of the counter has to be done by the client.

public IntroductoryOverlay.Builder setTitleText (int stringId)

Sets the text used in the Title area on the overlay. This will override the value specified in the resource file and is optional.

Parameters
stringId The resource ID of the text string used in the title.

public IntroductoryOverlay.Builder setTitleText (String text)

Sets the text used in the Title area on the overlay. This will override the value specified in the resource file and is optional.

Parameters
text The text string used in the title.
Attribute Name
CastIntroOverlay_castBackgroundColor
CastIntroOverlay_castFocusRadius