public static class

IntroductoryOverlay.Builder

extends Object
java.lang.Object
   ↳ com.google.android.gms.cast.framework.IntroductoryOverlay.Builder

Class Overview

The builder class that creates an instance of IntroductoryOverlay.

Summary

XML Attributes
Attribute Name Related Method Description
com.google.android.gms:castBackgroundColor setOverlayColor(int)  
com.google.android.gms:castFocusRadius setFocusRadiusId(int)  
Public Constructors
IntroductoryOverlay.Builder(Activity activity, MenuItem menuItem)
The constructor for the Builder class.
IntroductoryOverlay.Builder(Activity activity, MediaRouteButton button)
The constructor for the Builder class.
Public Methods
IntroductoryOverlay build()
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.
[Expand]
Inherited Methods
From class java.lang.Object

XML Attributes

com.google.android.gms:castBackgroundColor

Related Methods

com.google.android.gms:castFocusRadius

Related Methods

Public Constructors

public IntroductoryOverlay.Builder (Activity activity, MenuItem menuItem)

The constructor for the Builder class.

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

public IntroductoryOverlay.Builder (Activity activity, MediaRouteButton button)

The constructor for the Builder class.

Parameters
activity Activity: The Activity that is showing the overlay view.
button MediaRouteButton: 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 String: The text string used in the confirmation button.
Returns
IntroductoryOverlay.Builder

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 int: The resource ID of the text string used in the confirmation button.
Returns
IntroductoryOverlay.Builder

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 float: The radius of the "hole".
Returns
IntroductoryOverlay.Builder

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.

Related XML Attributes:

Parameters
radiusId int: The resource ID of the radius of the "hole".
Returns
IntroductoryOverlay.Builder

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 IntroductoryOverlay.OnOverlayDismissedListener: The IntroductoryOverlay.OnOverlayDismissedListener instance.
Returns
IntroductoryOverlay.Builder

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.

Related XML Attributes:

Parameters
colorId int: The resource ID of the background color.
Returns
IntroductoryOverlay.Builder

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.

Returns
IntroductoryOverlay.Builder

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 int: The resource ID of the text string used in the title.
Returns
IntroductoryOverlay.Builder

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 String: The text string used in the title.
Returns
IntroductoryOverlay.Builder