Class NativeAdViewBinder.Builder

com.yandex.mobile.ads.nativeads

public  class  NativeAdViewBinder.Builder 

Class for creating a NativeAdViewBinder object.

Methods

Builder(@NonNull final View nativeAdView)

Creates an object of the NativeAdViewBinder.Builder class.

Builder(@NonNull final NativeAdView nativeAdView)

Creates an object of the NativeAdViewBinder.Builder class.

NativeAdViewBinder build()

Creates an object of the NativeAdViewBinder class, which contains the View for all native ad assets.

Builder setAgeView(@Nullable final TextView ageView)

Sets the TextView to display data on age restrictions.

Builder setBodyView(@Nullable final TextView bodyView)

Sets TextView for displaying the main ad text.

Builder setCallToActionView(@Nullable final Button callToActionView)

Sets the Button to display a call-to-action.

Builder setDomainView(@Nullable final TextView domainView)

Sets the TextView to display domain data.

Builder setFaviconView(@Nullable final ImageView faviconView)

Sets ImageView to display the app's favicon.

Builder setFeedbackView(@Nullable final Button feedbackView)

Sets Button for handling the reasons for closing the ad.

Builder setIconView(@Nullable final ImageView iconView)

Sets ImageView for displaying the app icon.

Builder setImageView(@Nullable final ImageView imageView)

Sets ImageView for displaying the main image of an ad.

Builder setMediaView(@Nullable final MediaView mediaView)

Sets MediaView for displaying the media content.

Builder setPriceView(@Nullable final TextView priceView)

Sets TextView for displaying the price of the advertised app.

Builder setReviewCountView(@Nullable final TextView reviewCountView)

Sets TextView for displaying data on the number of reviews in the app.

Builder setSponsoredView(@Nullable final TextView sponsoredView)

Sets TextView for displaying data on the advertiser.

Builder setTitleView(@Nullable final TextView titleView)

Sets TextView for displaying the title of an ad.

Builder setWarningView(@Nullable final TextView warningView)

Sets TextView for displaying a warning.

Method Detail

Builder

public Builder (@NonNull final View nativeAdView)

Creates an object of the NativeAdViewBinder.Builder class.

Note.

This method is deprecated. Use the new method: Builder#Builder(NativeAdView).

Parameters:
nativeAdView

View for displaying native ads.

Builder

public Builder (@NonNull final NativeAdView nativeAdView)

Creates an object of the NativeAdViewBinder.Builder class.

Parameters:
nativeAdView

View for displaying native ads.

build

public NativeAdViewBinder build ()

Creates an object of the NativeAdViewBinder class, which contains the View for all native ad assets.

Returns:

An object of the NativeAdViewBinder class.

setAgeView

public Builder setAgeView (@Nullable final TextView ageView)

Sets the TextView to display data on age restrictions.

Parameters:
ageView

TextView to display data on age restrictions.

Returns:

TextView to display data on age restrictions.

setBodyView

public Builder setBodyView (@Nullable final TextView bodyView)

Sets TextView for displaying the main ad text.

Parameters:
bodyView

TextView for displaying the main ad text.

Returns:

TextView for displaying the main ad text.

setCallToActionView

public Builder setCallToActionView (@Nullable final Button callToActionView)

Sets the Button to display a call-to-action.

Parameters:
callToActionView

Button to display a call-to-action button.

Returns:

Button to display a call-to-action button.

setDomainView

public Builder setDomainView (@Nullable final TextView domainView)

Sets the TextView to display domain data.

Parameters:
domainView

TextView for displaying domain data.

Returns:

TextView for displaying domain data.

setFaviconView

public Builder setFaviconView (@Nullable final ImageView faviconView)

Sets ImageView to display the app's favicon.

Parameters:
faviconView

ImageView for displaying the app's favicon.

Returns:

ImageView for displaying the app's favicon.

setFeedbackView

public Builder setFeedbackView (@Nullable final Button feedbackView)

Sets Button for handling the reasons for closing the ad.

Parameters:
feedbackView

Button for handling the reasons for closing the ad.

Returns:

Button for handling the reasons for closing the ad.

setIconView

public Builder setIconView (@Nullable final ImageView iconView)

Sets ImageView for displaying the app icon.

Parameters:
iconView

ImageView for displaying the app icon.

Returns:

ImageView for displaying the app icon.

setImageView

public Builder setImageView (@Nullable final ImageView imageView)

Sets ImageView for displaying the main image of an ad.

Note.

This method is deprecated. Use the new method: #setMediaView(MediaView).

Parameters:
imageView

ImageView for displaying the ad's main image.

Returns:

ImageView for displaying the ad's main image.

setMediaView

public Builder setMediaView (@Nullable final MediaView mediaView)

Sets MediaView for displaying the media content.

Parameters:
mediaView

MediaView for displaying the media content.

setPriceView

public Builder setPriceView (@Nullable final TextView priceView)

Sets TextView for displaying the price of the advertised app.

Parameters:
priceView

TextView for displaying the price of the advertised app.

Returns:

TextView for displaying the price of the advertised app.

setReviewCountView

public Builder setReviewCountView (@Nullable final TextView reviewCountView)

Sets TextView for displaying data on the number of reviews in the app.

Parameters:
reviewCountView

TextView for displaying data on the number of reviews in the app.

Returns:

TextView for displaying data on the number of reviews in the app.

setSponsoredView

public Builder setSponsoredView (@Nullable final TextView sponsoredView)

Sets TextView for displaying data on the advertiser.

Parameters:
sponsoredView

TextView for displaying data on the advertiser.

Returns:

TextView for displaying data on the advertiser.

setTitleView

public Builder setTitleView (@Nullable final TextView titleView)

Sets TextView for displaying the title of an ad.

Parameters:
titleView

TextView for displaying the ad title.

Returns:

TextView for displaying the ad title.

setWarningView

public Builder setWarningView (@Nullable final TextView warningView)

Sets TextView for displaying a warning.

Parameters:
warningView

TextView for displaying a warning.

Returns:

TextView for displaying a warning.