Summary: Ctors | Methods | Inherited Methods | [Expand All]
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

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
Object | clone()
boolean | equals(Object arg0)
void | finalize()
final Class<?> | getClass()
int | hashCode()
final void | notify()
final void | notifyAll()
String | toString()
final void | wait(long arg0, int arg1)
final void | wait(long arg0)
final void | wait()

## Public Constructors

#### public IntroductoryOverlay.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 IntroductoryOverlay.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.