AdView
The AdView class is responsible for creating, loading, positioning, and displaying banner ads.
Constructors
_init / AdView
Initializes a new instance of the AdView class.
Usage:
Properties
ad_listener / AdListener
The listener object that receives various ad loading and lifecycle callbacks. See AdListener.
on_ad_paid / OnAdPaid
Callback triggered when an impression has occurred and the ad value (revenue) is calculated. Receives an AdValue.
Methods
load_ad / LoadAd
Loads an ad based on the request configuration.
destroy / Destroy
Destroys the banner and releases its native resources.
get_response_info / GetResponseInfo
Returns information about the loaded ad's response and mediation metadata.
show / Show
Displays the banner ad on screen.
hide / Hide
Hides the banner ad from the screen.
set_position / SetPosition
Sets a new position for the banner ad.
get_width / GetWidth
Returns the width of the ad in density-independent pixels (dp).
get_height / GetHeight
Returns the height of the ad in density-independent pixels (dp).
get_width_in_pixels / GetWidthInPixels
Returns the width of the ad in physical screen pixels.
get_height_in_pixels / GetHeightInPixels
Returns the height of the ad in physical screen pixels.
is_collapsible / IsCollapsible
Returns whether the loaded banner ad is a collapsible banner.