GoogleMobileAds. Api. BannerView

Banner views occupy a spot within an app's layout.

Summary

They stay on screen while users are interacting with the app.

Inheritance

Direct Known Subclasses: GoogleMobileAds.Api.AdManager.AdManagerBannerView

Constructors and Destructors

BannerView (string adUnitId, AdSize adSize, AdPosition position)
Creates a banner view with a standard position.
BannerView (string adUnitId, AdSize adSize, int x, int y)
Creates a banner view with a custom position.

Events

Action
Raised when an ad is clicked.
Action
Raised when the ad closed full-screen content.
Action
Raised when an ad opened full-screen content.
Action
Raised when an impression is recorded for an ad.
Action< AdValue >
Raised when the ad is estimated to have earned money.
Action< LoadAdError >
Raised when an ad fails to load into the banner view.
Action
Raised when an ad is loaded into the banner view.

Properties

bool
Returns true if Destroy() has been called.

Public functions

Destroy ()
void
Destroys the banner view.
string
Returns the ad unit ID.
float
Returns the height of the banner view in pixels.
Returns the ad request response info or null if the ad is not loaded.
float
Returns the width of the banner view in pixels.
Hide ()
void
Hides the banner view.
bool
Indicates whether the last loaded ad is a collapsible banner.
LoadAd ( AdRequest request)
void
Loads an ad into the banner view.
SetPosition ( AdPosition adPosition)
void
Sets the position of the banner view using standard position.
SetPosition (int x, int y)
void
Sets the position of the banner view using custom position.
Show ()
void
Shows the banner view.

Events

OnAdClicked

 Action 
  
 OnAdClicked 

Raised when an ad is clicked.

OnAdFullScreenContentClosed

 Action 
  
 OnAdFullScreenContentClosed 

Raised when the ad closed full-screen content.

On iOS, this event is only raised when an ad opens an overlay, not when opening a new application such as Safari or the App Store.

OnAdFullScreenContentOpened

 Action 
  
 OnAdFullScreenContentOpened 

Raised when an ad opened full-screen content.

OnAdImpressionRecorded

 Action 
  
 OnAdImpressionRecorded 

Raised when an impression is recorded for an ad.

OnAdPaid

 Action 
 < 
  
  AdValue 
 
  
 > 
  
 OnAdPaid 

Raised when the ad is estimated to have earned money.

OnBannerAdLoadFailed

 Action 
 < 
  
  LoadAdError 
 
  
 > 
  
 OnBannerAdLoadFailed 

Raised when an ad fails to load into the banner view.

OnBannerAdLoaded

 Action 
  
 OnBannerAdLoaded 

Raised when an ad is loaded into the banner view.

Properties

IsDestroyed

 bool 
  
 IsDestroyed 

Returns true if Destroy() has been called.

Public functions

BannerView

  
 BannerView 
 ( 
  
 string 
  
 adUnitId 
 , 
  
  AdSize 
 
  
 adSize 
 , 
  
  AdPosition 
 
  
 position 
 ) 

Creates a banner view with a standard position.

BannerView

  
 BannerView 
 ( 
  
 string 
  
 adUnitId 
 , 
  
  AdSize 
 
  
 adSize 
 , 
  
 int 
  
 x 
 , 
  
 int 
  
 y 
 ) 

Creates a banner view with a custom position.

Destroy

 void 
  
 Destroy 
 () 

Destroys the banner view.

GetAdUnitID

 string 
  
 GetAdUnitID 
 () 

Returns the ad unit ID.

GetHeightInPixels

 float 
  
 GetHeightInPixels 
 () 

Returns the height of the banner view in pixels.

GetResponseInfo

  ResponseInfo 
 
  
 GetResponseInfo 
 () 

Returns the ad request response info or null if the ad is not loaded.

GetWidthInPixels

 float 
  
 GetWidthInPixels 
 () 

Returns the width of the banner view in pixels.

Hide

 void 
  
 Hide 
 () 

Hides the banner view.

IsCollapsible

 bool 
  
 IsCollapsible 
 () 

Indicates whether the last loaded ad is a collapsible banner.

LoadAd

 void 
  
 LoadAd 
 ( 
  
  AdRequest 
 
  
 request 
 ) 

Loads an ad into the banner view.

SetPosition

 void 
  
 SetPosition 
 ( 
  
  AdPosition 
 
  
 adPosition 
 ) 

Sets the position of the banner view using standard position.

SetPosition

 void 
  
 SetPosition 
 ( 
  
 int 
  
 x 
 , 
  
 int 
  
 y 
 ) 

Sets the position of the banner view using custom position.

Show

 void 
  
 Show 
 () 

Shows the banner view.

Create a Mobile Website
View Site in Mobile | Classic
Share by: