# 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](https://developers.google.com/admob/unity/reference/class/google-mobile-ads/api/banner-view)

| ### Constructors and Destructors ||
|---|---|
| `https://developers.google.com/admob/unity/reference/class/google-mobile-ads/api/ad-manager/ad-manager-banner-view#class_google_mobile_ads_1_1_api_1_1_ad_manager_1_1_ad_manager_banner_view_1a38f47cf484b1327525dc6d42637225ec(string adUnitId, https://developers.google.com/admob/unity/reference/class/google-mobile-ads/api/ad-size#class_google_mobile_ads_1_1_api_1_1_ad_size adSize, https://developers.google.com/admob/unity/reference/namespace/google-mobile-ads/api#namespace_google_mobile_ads_1_1_api_1a228f8d5fe7b1ef40558cb59eac9befbd position)` Creates an Ad Manager banner view with a standard position. ||
| `https://developers.google.com/admob/unity/reference/class/google-mobile-ads/api/ad-manager/ad-manager-banner-view#class_google_mobile_ads_1_1_api_1_1_ad_manager_1_1_ad_manager_banner_view_1a2a5f8cace529a1cf7da46f1eb322823a(string adUnitId, https://developers.google.com/admob/unity/reference/class/google-mobile-ads/api/ad-size#class_google_mobile_ads_1_1_api_1_1_ad_size adSize, int x, int y)` Creates an Ad Manager banner view with a custom position. ||

| ### Events ||
|---|---|
| `https://developers.google.com/admob/unity/reference/class/google-mobile-ads/api/ad-manager/ad-manager-banner-view#class_google_mobile_ads_1_1_api_1_1_ad_manager_1_1_ad_manager_banner_view_1a347b100ff5754d019281e2d413123d51` | `Action< https://developers.google.com/admob/unity/reference/class/google-mobile-ads/api/ad-manager/app-event#class_google_mobile_ads_1_1_api_1_1_ad_manager_1_1_app_event >` Raised when the app receives an event from the banner ad. |

| ### Properties ||
|---|---|
| `https://developers.google.com/admob/unity/reference/class/google-mobile-ads/api/ad-manager/ad-manager-banner-view#class_google_mobile_ads_1_1_api_1_1_ad_manager_1_1_ad_manager_banner_view_1a9925e76bfc4183c616047e01d8c4ab8a` | `List< https://developers.google.com/admob/unity/reference/class/google-mobile-ads/api/ad-size#class_google_mobile_ads_1_1_api_1_1_ad_size >` Sets the supported sizes of the banner ad. |

## Events

### OnAppEventReceived

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

## Properties

### ValidAdSizes

```c#
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](https://developers.google.com/admob/unity/reference/class/google-mobile-ads/api/ad-size#class_google_mobile_ads_1_1_api_1_1_ad_size_1a744724a26d59f412bf0279d3c7b7cb88)), 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](https://developers.google.com/admob/unity/reference/class/google-mobile-ads/api/ad-manager/ad-manager-banner-view#class_google_mobile_ads_1_1_api_1_1_ad_manager_1_1_ad_manager_banner_view_1a9925e76bfc4183c616047e01d8c4ab8a) during the [AdManagerBannerView::OnBannerAdLoaded](https://developers.google.com/admob/unity/reference/class/google-mobile-ads/api/banner-view#class_google_mobile_ads_1_1_api_1_1_banner_view_1a098b6c438df081b1ee64270b0038dc53) callback and change the layout according to the size of the ad that was loaded. If multiple ad sizes are specified, the [AdManagerBannerView](https://developers.google.com/admob/unity/reference/class/google-mobile-ads/api/ad-manager/ad-manager-banner-view#class_google_mobile_ads_1_1_api_1_1_ad_manager_1_1_ad_manager_banner_view) 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

```c#
 AdManagerBannerView(
  string adUnitId,
  AdSize adSize,
  AdPosition position
)
```
Creates an Ad Manager banner view with a standard position.

### AdManagerBannerView

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