Class NativeImageAdView

com.yandex.mobile.ads.nativeads

java.lang.Object ⇽ NativeImageAdView

public class NativeImageAdView

The class contains a view for all assets of an ad in the Image format.

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

The class is only used for working with ADFOX.

Constructors

NativeImageAdView(final android.content.Context context)

Creates an object of the NativeImageAdView class programmatically.

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

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

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

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

Methods

void setFeedbackView(final android.widget.Button feedbackView)

Sets Button for handling the reasons for closing the ad.

void setImageView(final android.widget.ImageView imageView)

Sets ImageView for the main image in an ad.

void setMediaView(final MediaView mediaView)

Sets MediaView for displaying the media content.

Constructor Detail

NativeImageAdView

public NativeImageAdView (final android.content.Context context)

Creates an object of the NativeImageAdView class programmatically.

Parameters:
context

An object of the Context system class.

NativeImageAdView

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

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

Parameters:
context

An object of the Context system class.

attrs

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

NativeImageAdView

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

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

Parameters:
context

An object of the Context system class.

attrs

Attributes that are defined when creating the NativeImageAdView 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

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.

setImageView

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

Sets ImageView for the main image in an ad.

Parameters:
imageView

ImageView for the main image in the 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.