DynamicHeightSearchAdRequest.Builder

public static final class DynamicHeightSearchAdRequest.Builder extends Object

Public Constructor Summary

Public Method Summary

DynamicHeightSearchAdRequest.Builder
addCustomEventExtrasBundle(Class<? extends CustomEvent> adapterClass, Bundle customEventExtras)
Adds extra parameters to pass to a specific custom event adapter.
DynamicHeightSearchAdRequest.Builder
addNetworkExtras(NetworkExtras networkExtras)
Adds extra parameters to pass to a specific ad network adapter.
DynamicHeightSearchAdRequest.Builder
addNetworkExtrasBundle(Class<? extends MediationAdapter> adapterClass, Bundle networkExtras)
Adds extra parameters to pass to a specific ad network adapter.
DynamicHeightSearchAdRequest
build()
Constructs a DynamicHeightSearchAdRequest with the specified attributes.
DynamicHeightSearchAdRequest.Builder
setAdBorderSelectors(String adBorderSelectors)
The CSA "adBorderSelections" parameter.
DynamicHeightSearchAdRequest.Builder
setAdTest(boolean adTest)
Indicates if the CSA "adTest" parameter is enabled.
DynamicHeightSearchAdRequest.Builder
setAdjustableLineHeight(int adjustableLineHeight)
The CSA "adjustableLineHeight" parameter.
DynamicHeightSearchAdRequest.Builder
setAdvancedOptionValue(String key, String value)
Sets an advanced option value for a specified key.
DynamicHeightSearchAdRequest.Builder
setAttributionSpacingBelow(int attributionSpacingBelow)
The CSA "attributionSpacingBelow" parameter.
DynamicHeightSearchAdRequest.Builder
setBorderSelections(String borderSelections)
The CSA "borderSelections" parameter.
DynamicHeightSearchAdRequest.Builder
setChannel(String channel)
The CSA "channel" parameter.
DynamicHeightSearchAdRequest.Builder
setColorAdBorder(String colorAdBorder)
The CSA "colorAdBorder" parameter.
DynamicHeightSearchAdRequest.Builder
setColorAdSeparator(String colorAdSeparator)
The CSA "colorAdSeparator" parameter.
DynamicHeightSearchAdRequest.Builder
setColorAnnotation(String colorAnnotation)
The CSA "colorAnnotation" parameter.
DynamicHeightSearchAdRequest.Builder
setColorAttribution(String colorAttribution)
The CSA "colorAttribution" parameter.
DynamicHeightSearchAdRequest.Builder
setColorBackground(String colorBackground)
The CSA "colorBackground" parameter.
DynamicHeightSearchAdRequest.Builder
setColorBorder(String colorBorder)
The CSA "colorBorder" parameter.
DynamicHeightSearchAdRequest.Builder
setColorDomainLink(String colorDomainLink)
The CSA "colorDomainLink" parameter.
DynamicHeightSearchAdRequest.Builder
setColorText(String colorText)
The CSA "colorText" parameter.
DynamicHeightSearchAdRequest.Builder
setColorTitleLink(String colorTitleLink)
The CSA "colorTitleLink" parameter.
DynamicHeightSearchAdRequest.Builder
setCssWidth(int width)
The CSA "width" parameter.
DynamicHeightSearchAdRequest.Builder
setDetailedAttribution(boolean detailedAttribution)
Indicates if the CSA "detailedAttribution" parameter is enabled.
DynamicHeightSearchAdRequest.Builder
setFontFamily(String fontFamily)
The CSA "fontFamily" parameter.
DynamicHeightSearchAdRequest.Builder
setFontFamilyAttribution(String fontFamilyAttribution)
The CSA "fontFamilyAttribution" parameter.
DynamicHeightSearchAdRequest.Builder
setFontSizeAnnotation(int fontSizeAnnotation)
The CSA "fontSizeAnnotation" parameter.
DynamicHeightSearchAdRequest.Builder
setFontSizeAttribution(int fontSizeAttribution)
The CSA "fontSizeAttribution" parameter.
DynamicHeightSearchAdRequest.Builder
setFontSizeDescription(int fontSizeDescription)
The CSA "fontSizeDescription" parameter.
DynamicHeightSearchAdRequest.Builder
setFontSizeDomainLink(int fontSizeDomainLink)
The CSA "fontSizeDomainLink" parameter.
DynamicHeightSearchAdRequest.Builder
setFontSizeTitle(int fontSizeTitle)
The CSA "fontSizeTitle" parameter.
DynamicHeightSearchAdRequest.Builder
setHostLanguage(String hostLanguage)
The CSA "hl" parameter.
DynamicHeightSearchAdRequest.Builder
setIsClickToCallEnabled(boolean isClickToCallEnabled)
Indicates if the CSA "clickToCall" parameter is enabled.
DynamicHeightSearchAdRequest.Builder
setIsLocationEnabled(boolean isLocationEnabled)
Indicates if the CSA "location" parameter is enabled.
DynamicHeightSearchAdRequest.Builder
setIsPlusOnesEnabled(boolean isPlusOnesEnabled)
Indicates if the CSA "plusOnes" parameter is enabled.
DynamicHeightSearchAdRequest.Builder
setIsSellerRatingsEnabled(boolean isSellerRatingsEnabled)
Indicates if the CSA "sellerRatings" parameter is enabled.
DynamicHeightSearchAdRequest.Builder
setIsSiteLinksEnabled(boolean isSiteLinksEnabled)
Indicates if the CSA "siteLinks" parameter is enabled.
DynamicHeightSearchAdRequest.Builder
setIsTitleBold(boolean isTitleBold)
Indicates if the CSA "titleBold" parameter is enabled.
DynamicHeightSearchAdRequest.Builder
setIsTitleUnderlined(boolean isTitleUnderlined)
Indicates if the CSA "noTitleUnderline" parameter is enabled.
DynamicHeightSearchAdRequest.Builder
setLocationColor(String locationColor)
The CSA "colorLocation" parameter.
DynamicHeightSearchAdRequest.Builder
setLocationFontSize(int locationFontSize)
The CSA "fontSizeLocation" parameter.
DynamicHeightSearchAdRequest.Builder
setLongerHeadlines(boolean longerHeadlines)
Indicates if the CSA "longerHeadlines" parameter is enabled.
DynamicHeightSearchAdRequest.Builder
setNumber(int numberOfAds)
The CSA "number" parameter.
DynamicHeightSearchAdRequest.Builder
setPage(int adPage)
The CSA "adPage" parameter.
DynamicHeightSearchAdRequest.Builder
setQuery(String query)
Sets the query for requesting a search ad.
DynamicHeightSearchAdRequest.Builder
setStyleId(String styleId)
The CSA "Style ID" parameter.
DynamicHeightSearchAdRequest.Builder
setVerticalSpacing(int verticalSpacing)
The CSA "verticalSpacing" parameter.

Inherited Method Summary

Public Constructors

public Builder ()

Public Methods

public DynamicHeightSearchAdRequest.Builder addCustomEventExtrasBundle (Class<? extends CustomEvent> adapterClass, Bundle customEventExtras)

Adds extra parameters to pass to a specific custom event adapter.

Parameters
adapterClass The Class of the custom event adapter for which you are providing extras.
customEventExtras A Bundle of extra information to pass to a custom event adapter.

public DynamicHeightSearchAdRequest.Builder addNetworkExtras (NetworkExtras networkExtras)

Adds extra parameters to pass to a specific ad network adapter. The networkExtras parameter should be an instance of com.google.ads.mediation.NetworkExtras, which is provided by ad network adapters.

Note that the NetworkExtras class has been deprecated. This method is included to maintain compatibility with older adapters.

public DynamicHeightSearchAdRequest.Builder addNetworkExtrasBundle (Class<? extends MediationAdapter> adapterClass, Bundle networkExtras)

Adds extra parameters to pass to a specific ad network adapter.

Parameters
adapterClass The Class of the adapter for the network for which you are providing extras.
networkExtras A Bundle of extra information to pass to a mediation adapter.

public DynamicHeightSearchAdRequest build ()

Constructs a DynamicHeightSearchAdRequest with the specified attributes.

public DynamicHeightSearchAdRequest.Builder setAdBorderSelectors (String adBorderSelectors)

The CSA "adBorderSelections" parameter.

Specifies border lines for each ad in the ad unit. This must be used in conjunction with the colorAdBorder parameter. The following values are valid for adBorderSelections: 'top', 'right', 'bottom', 'left'

public DynamicHeightSearchAdRequest.Builder setAdTest (boolean adTest)

Indicates if the CSA "adTest" parameter is enabled.

The adTest parameter is used to indicate that a request for ads is a test. When the adTest parameter has a value of on, Google treats the request as a test and does not count the ad impressions or track the clickthrough results.

public DynamicHeightSearchAdRequest.Builder setAdjustableLineHeight (int adjustableLineHeight)

The CSA "adjustableLineHeight" parameter.

Specifies the line height for the title, description, and visible url ad elements. Note that the line height includes the ad element text. If the line height is greater than the text, the text is centered vertically and the remaining pixels are distributed equally as padding above and below the text.

public DynamicHeightSearchAdRequest.Builder setAdvancedOptionValue (String key, String value)

Sets an advanced option value for a specified key.

public DynamicHeightSearchAdRequest.Builder setAttributionSpacingBelow (int attributionSpacingBelow)

The CSA "attributionSpacingBelow" parameter.

Specifies the amount of vertical spacing between the attribution and the ads in pixels. Note that 4px of padding are automatically added and this value specifies the number of additional pixels.

public DynamicHeightSearchAdRequest.Builder setBorderSelections (String borderSelections)

The CSA "borderSelections" parameter.

Specifies border lines for the ad unit. This must be used in conjunction with the colorBorder parameter. The following values are valid for borderSelections: 'top', 'right', 'bottom', 'left'

public DynamicHeightSearchAdRequest.Builder setChannel (String channel)

The CSA "channel" parameter.

An AdSense for Search channel ID may be included for tracking the performance of different pages.

public DynamicHeightSearchAdRequest.Builder setColorAdBorder (String colorAdBorder)

The CSA "colorAdBorder" parameter.

Places a border in the specified color around an individual ad and creates a "box" look around each ad.

public DynamicHeightSearchAdRequest.Builder setColorAdSeparator (String colorAdSeparator)

The CSA "colorAdSeparator" parameter.

Places a 1px border between the ads in an ad block. The default is off with no border between ads.

public DynamicHeightSearchAdRequest.Builder setColorAnnotation (String colorAnnotation)

The CSA "colorAnnotation" parameter.

Specifies the color of the text annotations (e.g. siteLinks, plusOnes).

public DynamicHeightSearchAdRequest.Builder setColorAttribution (String colorAttribution)

The CSA "colorAttribution" parameter.

Specifies the color of the attribution.

public DynamicHeightSearchAdRequest.Builder setColorBackground (String colorBackground)

The CSA "colorBackground" parameter.

Specifies the background color of the ad.

public DynamicHeightSearchAdRequest.Builder setColorBorder (String colorBorder)

The CSA "colorBorder" parameter.

Specifies a 1px border color for the ad unit. If none is provided the ad unit will have no border.

The CSA "colorDomainLink" parameter.

Specifies the color of the link to the advertiser's site.

public DynamicHeightSearchAdRequest.Builder setColorText (String colorText)

The CSA "colorText" parameter.

Specifies the color of the ad description text.

The CSA "colorTitleLink" parameter.

Specifies the color of the ad title.

public DynamicHeightSearchAdRequest.Builder setCssWidth (int width)

The CSA "width" parameter.

Specifies the width of the ad unit in pixels.

public DynamicHeightSearchAdRequest.Builder setDetailedAttribution (boolean detailedAttribution)

Indicates if the CSA "detailedAttribution" parameter is enabled.

Extends the attribution to include the user query.

public DynamicHeightSearchAdRequest.Builder setFontFamily (String fontFamily)

The CSA "fontFamily" parameter.

Specifies the font family of the entire ad unit. The default font is Arial. This parameter supports a comma-separated list of fonts.

public DynamicHeightSearchAdRequest.Builder setFontFamilyAttribution (String fontFamilyAttribution)

The CSA "fontFamilyAttribution" parameter.

Specifies the font family of the attribution. The default font is Arial. This parameter supports a comma-separated list of fonts.

public DynamicHeightSearchAdRequest.Builder setFontSizeAnnotation (int fontSizeAnnotation)

The CSA "fontSizeAnnotation" parameter.

Specifies the size (in pixels) of the text annotations (e.g. siteLinks, plusOnes).

public DynamicHeightSearchAdRequest.Builder setFontSizeAttribution (int fontSizeAttribution)

The CSA "fontSizeAttribution" parameter.

Specifies the size (in pixels) of the attribution.

public DynamicHeightSearchAdRequest.Builder setFontSizeDescription (int fontSizeDescription)

The CSA "fontSizeDescription" parameter.

Specifies the size (in pixels) of the ad description text.

The CSA "fontSizeDomainLink" parameter.

Specifies the size (in pixels) of the link to the advertiser's site.

public DynamicHeightSearchAdRequest.Builder setFontSizeTitle (int fontSizeTitle)

The CSA "fontSizeTitle" parameter.

Specifies the size (in pixels) of the ad title.

public DynamicHeightSearchAdRequest.Builder setHostLanguage (String hostLanguage)

The CSA "hl" parameter.

Identifies the language that the requested ads should target.

public DynamicHeightSearchAdRequest.Builder setIsClickToCallEnabled (boolean isClickToCallEnabled)

Indicates if the CSA "clickToCall" parameter is enabled.

Allow or disallow click to call ads.

public DynamicHeightSearchAdRequest.Builder setIsLocationEnabled (boolean isLocationEnabled)

Indicates if the CSA "location" parameter is enabled.

Provides a way for the ad to display location information such as the address.

public DynamicHeightSearchAdRequest.Builder setIsPlusOnesEnabled (boolean isPlusOnesEnabled)

Indicates if the CSA "plusOnes" parameter is enabled.

Enables social annotations for ads.

public DynamicHeightSearchAdRequest.Builder setIsSellerRatingsEnabled (boolean isSellerRatingsEnabled)

Indicates if the CSA "sellerRatings" parameter is enabled.

Seller rating extensions provide user-submitted ratings information about sellers next to their ads.

public DynamicHeightSearchAdRequest.Builder setIsSiteLinksEnabled (boolean isSiteLinksEnabled)

Indicates if the CSA "siteLinks" parameter is enabled.

Ad Sitelinks is a feature that lets advertisers include up to 4 additional links to deeper content on their site beyond the main landing page.

public DynamicHeightSearchAdRequest.Builder setIsTitleBold (boolean isTitleBold)

Indicates if the CSA "titleBold" parameter is enabled.

Allows the entire ad title line to be bold.

public DynamicHeightSearchAdRequest.Builder setIsTitleUnderlined (boolean isTitleUnderlined)

Indicates if the CSA "noTitleUnderline" parameter is enabled.

Specifies whether or not the ad title will be underlined. The default is true (ads will have an underline).

public DynamicHeightSearchAdRequest.Builder setLocationColor (String locationColor)

The CSA "colorLocation" parameter.

Specifies the color of the location extension.

public DynamicHeightSearchAdRequest.Builder setLocationFontSize (int locationFontSize)

The CSA "fontSizeLocation" parameter.

Specifies the font size of the location extension.

public DynamicHeightSearchAdRequest.Builder setLongerHeadlines (boolean longerHeadlines)

Indicates if the CSA "longerHeadlines" parameter is enabled.

Longer Headlines extends ad headlines by appending the first description line and/or display URL under certain conditions, promoting important information to the headline.

public DynamicHeightSearchAdRequest.Builder setNumber (int numberOfAds)

The CSA "number" parameter.

The number of ads which should appear in this unit.

public DynamicHeightSearchAdRequest.Builder setPage (int adPage)

The CSA "adPage" parameter.

The adPage parameter specifies the results page ads are being displayed on. This parameter is used when users navigate past the first page of search results.

public DynamicHeightSearchAdRequest.Builder setQuery (String query)

Sets the query for requesting a search ad. The query must be set to receive an ad.

public DynamicHeightSearchAdRequest.Builder setStyleId (String styleId)

The CSA "Style ID" parameter.

Specifies the style of the ads.

public DynamicHeightSearchAdRequest.Builder setVerticalSpacing (int verticalSpacing)

The CSA "verticalSpacing" parameter.

Specifies the amount of vertical spacing between ads in pixels. Note that 4px of padding are automatically added to the top and bottom of each ad for a total of 8 pixels. The default value for verticalSpacing is 4, the min is 2, and the max is 12.