GoogleMobileAds.Api.AdManager.AdManagerBannerView

Banner view that works with Google Ad Manager.

Summary

Banner views occupy a spot within an app's layout. They stay on screen while users are interacting with the app.

Inheritance

Inherits from: GoogleMobileAds.Api.BannerView

Constructors and Destructors

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

Events

OnAppEventReceived
Action< AppEvent >
Raised when the app receives an event from the banner ad.

Properties

ValidAdSizes
List< AdSize >
Sets the supported sizes of the banner ad.

Events

OnAppEventReceived

Action< AppEvent > OnAppEventReceived

Raised when the app receives an event from the banner ad.

Properties

ValidAdSizes

List< AdSize > ValidAdSizes

Sets the supported sizes of the banner ad.

In most cases, only one ad size will be specified. Use one of the predefined standard ad sizes (such as AdSize.MediumRectangle), or create one by specifying width and height.

Multiple ad sizes can be specified if your application can appropriately handle multiple ad sizes. For example, your application might read ValidAdSizes during the AdManagerBannerView::OnBannerAdLoaded callback and change the layout according to the size of the ad that was loaded. If multiple ad sizes are specified, the AdManagerBannerView will assume the size of the first ad size until an ad is loaded.

This method also immediately resizes the currently displayed ad, so calling this method after an ad has been loaded is not recommended unless you know for certain that the content of the ad will render correctly in the new ad size. This can be used if an ad needs to be resized after it has been loaded. If more than one ad size is specified, the currently displayed ad will be resized to the first ad size.

Public functions

AdManagerBannerView

 AdManagerBannerView(
  string adUnitId,
  AdSize adSize,
  AdPosition position
)

Creates an Ad Manager banner view with a standard position.

AdManagerBannerView

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

Creates an Ad Manager banner view with a custom position.