Class NativeAppInstallAdView

com.yandex.mobile.ads.nativeads

java.lang.Object ⇽ NativeAppInstallAdView

public class NativeAppInstallAdView

This class contains a view for all assets of an ad in the App Install format.

The view must be set for each mandatory asset, otherwise binding will fail and the ad will not be displayed.

Constructors

NativeAppInstallAdView(final android.content.Context context)

Creates an object of the NativeAppInstallAdView class programmatically.

NativeAppInstallAdView(final android.content.Context context, final android.util.AttributeSet attrs)

Creates an object of the NativeAppInstallAdView class from an XML file.

NativeAppInstallAdView(final android.content.Context context, final android.util.AttributeSet attrs, final int defStyleAttr)

Creates an object of the NativeAppInstallAdView class from an XML file.

Methods

NativeAppInstallAdBinder getNativeAd()

Returns native ads in the App Install format.

void setAgeView(final android.widget.TextView ageView)

Sets the TextView for the age component.

void setBodyView(final android.widget.TextView bodyView)

Sets TextView for the main text of an ad.

void setCallToActionView(final android.widget.Button callToActionView)

Sets Button for a call-to-action button.

void setDomainView(final android.widget.TextView domainView)

Sets TextView for the domain component.

void setFeedbackView(final android.widget.Button feedbackView)

Sets Button for handling the reasons for closing the ad.

void setIconView(final android.widget.ImageView iconView)

Sets ImageView for the app icon.

void setImageView(final android.widget.ImageView imageView)

Sets ImageView for the main image of an ad.

void setMediaView(final MediaView mediaView)

Sets MediaView for displaying the media content.

void setPriceView(final android.widget.TextView priceView)

Sets TextView for data on the cost of the advertised app.

void setReviewCountView(final android.widget.TextView reviewCountView)

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

void setSponsoredView(final android.widget.TextView sponsoredView)

Sets TextView for the advertiser component.

void setTitleView(final android.widget.TextView titleView)

Sets the TextView for the title of an ad.

void setWarningView(final android.widget.TextView warningView)

Sets TextView for a warning.

Constructor Detail

NativeAppInstallAdView

public NativeAppInstallAdView (final android.content.Context context)

Creates an object of the NativeAppInstallAdView class programmatically.

Parameters:
context

An object of the Context system class.

NativeAppInstallAdView

public NativeAppInstallAdView (final android.content.Context context, final android.util.AttributeSet attrs)

Creates an object of the NativeAppInstallAdView class from an XML file.

Parameters:
context

An object of the Context system class.

attrs

Attributes that are defined when creating the NativeAppInstallAdView object via a representation in an XML file.

NativeAppInstallAdView

public NativeAppInstallAdView (final android.content.Context context, final android.util.AttributeSet attrs, final int defStyleAttr)

Creates an object of the NativeAppInstallAdView class from an XML file.

Parameters:
context

An object of the Context system class.

attrs

Attributes that are defined when creating the NativeAppInstallAdView object via a representation in an XML file.

defStyleAttr

An attribute that contains a reference to a style resource for view. The default values are described in the resource. The default values are described in the resource.

Method Detail

getNativeAd

public NativeAppInstallAdBinder getNativeAd ()

Returns native ads in the App Install format.

Returns:

Native ads in the App Install format.

setAgeView

public void setAgeView (final android.widget.TextView ageView)

Sets the TextView for the age component.

Parameters:
ageView

TextView for the age component.

setBodyView

public void setBodyView (final android.widget.TextView bodyView)

Sets TextView for the main text of an ad.

Parameters:
bodyView

TextView for the main text of an ad.

setCallToActionView

public void setCallToActionView (final android.widget.Button callToActionView)

Sets Button for a call-to-action button.

Parameters:
callToActionView

Button for a call-to-action button.

setDomainView

public void setDomainView (final android.widget.TextView domainView)

Sets TextView for the domain component.

Parameters:
domainView

TextView for the domain component.

setFeedbackView

public void setFeedbackView (final android.widget.Button feedbackView)

Sets Button for handling the reasons for closing the ad.

Parameters:
feedbackView

Button for handling the reasons for closing the ad.

setIconView

public void setIconView (final android.widget.ImageView iconView)

Sets ImageView for the app icon.

Parameters:
iconView

ImageView for the app icon.

setImageView

public void setImageView (final android.widget.ImageView imageView)

Sets ImageView for the main image of an ad.

Parameters:
imageView

ImageView for the main image of an ad.

Note.

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

setMediaView

public void setMediaView (final MediaView mediaView)

Sets MediaView for displaying the media content.

Parameters:
mediaView

MediaView for displaying the media content.

setPriceView

public void setPriceView (final android.widget.TextView priceView)

Sets TextView for data on the cost of the advertised app.

Parameters:
priceView

TextView for data on the cost of the advertised app.

setReviewCountView

public void setReviewCountView (final android.widget.TextView reviewCountView)

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

Parameters:
reviewCountView

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

setSponsoredView

public void setSponsoredView (final android.widget.TextView sponsoredView)

Sets TextView for the advertiser component.

Parameters:
sponsoredView

TextView for the adviser component.

setTitleView

public void setTitleView (final android.widget.TextView titleView)

Sets the TextView for the title of an ad.

Parameters:
titleView

TextView for the title of an ad.

setWarningView

public void setWarningView (final android.widget.TextView warningView)

Sets TextView for a warning.

Parameters:
warningView

TextView for warning.