GfpNativeAdView

class GfpNativeAdView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0) : FrameLayout, ViewExtensions

View class for displaying native ads. After loading, call {@link #setNativeAd(GfpNativeAd)} to attach each asset to the page.

Constructors

Link copied to clipboard
constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0)

Creates a new GfpNativeAdView instance.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
var adChoicesView: <Error class: unknown class>?

View for displaying ad choices content

Link copied to clipboard

View for displaying the advertiser asset

Link copied to clipboard

View Group for all ad assets

Link copied to clipboard

View for displaying the body asset

Link copied to clipboard

View for displaying the call-to-action asset

Link copied to clipboard

View for displaying the icon asset

Link copied to clipboard

View for displaying the media content

Link copied to clipboard

View for displaying notice asset

Link copied to clipboard

View for displaying social context asset

Link copied to clipboard

View for displaying the title asset

Functions

Link copied to clipboard
open override fun addView(child: View?, index: Int, params: ViewGroup.LayoutParams?)
Link copied to clipboard
open override fun bringChildToFront(child: View?)
Link copied to clipboard
Link copied to clipboard

Gets an extra image asset view by its key.

Link copied to clipboard

Gets an extra text asset view by its key.

Link copied to clipboard
open override fun removeAllViews()
Link copied to clipboard
open override fun removeView(view: View?)
Link copied to clipboard

Sets an extra image asset view with the specified key.

Link copied to clipboard
fun setExtraTextView(key: String, view: View)

Sets an extra text asset view with the specified key.

Link copied to clipboard
fun setNativeAd(nativeAd: GfpNativeAd)

Sets the native ad to be displayed in this view. This method must be called after loading the ad to attach all assets to the view.