GfpNativeAdOptions

class GfpNativeAdOptions(val theme: GfpTheme? = null, val adChoicesPlacement: Int = ADCHOICES_TOP_RIGHT, val richMediaPaddingInDp: Rect = Rect(0, 0, 0, 0), activateObservingOnBackground: Boolean = false, hasMediaView: Boolean = true, enableMediaBackgroundBlur: Boolean = false, enableMediaOverlayDim: Boolean = false, enableCustomAdChoices: Boolean = false, val mediaViewLazyLoadingOptions: MediaViewLazyLoadingOptions? = null, val mediaViewLazyLoadingListener: MediaViewLazyLoadingListener? = null, val videoOptions: GfpNativeVideoOptions = GfpNativeVideoOptions()) : GfpNativeAdOptionsBase

A class used to configure native ad requests.

Constructors

Link copied to clipboard
constructor(theme: GfpTheme? = null, adChoicesPlacement: Int = ADCHOICES_TOP_RIGHT, richMediaPaddingInDp: Rect = Rect(0, 0, 0, 0), activateObservingOnBackground: Boolean = false, hasMediaView: Boolean = true, enableMediaBackgroundBlur: Boolean = false, enableMediaOverlayDim: Boolean = false, enableCustomAdChoices: Boolean = false, mediaViewLazyLoadingOptions: MediaViewLazyLoadingOptions? = null, mediaViewLazyLoadingListener: MediaViewLazyLoadingListener? = null, videoOptions: GfpNativeVideoOptions = GfpNativeVideoOptions())

Types

Link copied to clipboard
class Builder

Builder for GfpNativeAdOptions instances.

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val adChoicesPlacement: Int

the ad choices placements.

Link copied to clipboard

listener for media view lazy loading events. This listener only works for Native Normal ads with IMAGE media type.

Link copied to clipboard

lazy loading options for media view image. This option only works for Native Normal ads with IMAGE media type. Otherwise, this option is ignored.

Link copied to clipboard
open override val richMediaPaddingInDp: Rect

the padding for rich media type.

Link copied to clipboard
open override val theme: GfpTheme? = null

the GfpTheme set to native ad.

Link copied to clipboard
open override val videoOptions: GfpNativeVideoOptions

the GfpNativeVideoOptions object.

Functions

Link copied to clipboard

Creates a new Builder instance for modifying this GfpNativeAdOptions.

Link copied to clipboard
open override fun hasMediaView(): Boolean

Returns true if native ad has media view.

Link copied to clipboard

Returns whether to allow impression measurement of views even if the ad is rendered while the app is in the background.

Link copied to clipboard
open override fun isCustomAdChoicesEnabled(): Boolean

Returns true if native ad can be muted programmatically.

Link copied to clipboard

Returns true if the background of the media view is blurred.

Link copied to clipboard
open override fun isMediaOverlayDimEnabled(): Boolean

Returns true if the overlay of the media view is dimmed.

Link copied to clipboard

Returns true if lazy loading is enabled for media view image.