Stay organized with collections
Save and categorize content based on your preferences.
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
Properties
|
ValidAdSizes
|
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.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-09-07 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-09-07 UTC."],[[["`AdManagerBannerView` is a UI element that displays banner ads from Google Ad Manager within your app."],["These banner ads persist on screen while users interact with the app, occupying a designated space in the layout."],["You can customize the banner's position and size, and even support multiple ad sizes for flexibility."],["`AdManagerBannerView` provides events like `OnAppEventReceived` and properties like `ValidAdSizes` to handle ad interactions and configurations."],["Two constructors are available for creating banner views: one for standard ad positions and another for custom positions defined by x and y coordinates."]]],[]]