Stay organized with collections
Save and categorize content based on your preferences.
firebase::gma::AdViewBoundingBoxListener
This is an abstract class.
#include <ad_view.h>
A listener class that developers can extend and pass to an AdView object's AdView::SetBoundingBoxListener method to be notified of changes to the size of the Ad's bounding box.
Summary
Public functions
OnBoundingBoxChanged
virtual void OnBoundingBoxChanged(
AdView *ad_view,
BoundingBox box
)=0
This method is called when the AdView object's bounding box changes.
Details |
Parameters |
ad_view
|
The view whose bounding box changed.
|
box
|
The new bounding box.
|
|
~AdViewBoundingBoxListener
virtual ~AdViewBoundingBoxListener()
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 2025-08-20 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 2025-08-20 UTC."],[[["\u003cp\u003e\u003ccode\u003efirebase::gma::AdViewBoundingBoxListener\u003c/code\u003e is an abstract class that listens for changes in an AdView's bounding box.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can extend this class and pass it to an AdView to be notified about bounding box size changes.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eOnBoundingBoxChanged\u003c/code\u003e function is called when the AdView's bounding box is modified, providing the updated box dimensions.\u003c/p\u003e\n"],["\u003cp\u003eThis listener is crucial for adapting to dynamic AdView placements and ensuring proper layout within your application.\u003c/p\u003e\n"]]],[],null,["# firebase::gma::AdViewBoundingBoxListener Class Reference\n\nfirebase::gma::AdViewBoundingBoxListener\n========================================\n\n\n**This is an abstract class.**\n\n\n`#include \u003cad_view.h\u003e`\n\nA listener class that developers can extend and pass to an [AdView](/admob/cpp/reference/class/firebase/gma/ad-view#classfirebase_1_1gma_1_1_ad_view) object's [AdView::SetBoundingBoxListener](/admob/cpp/reference/class/firebase/gma/ad-view#classfirebase_1_1gma_1_1_ad_view_1acb82158262dd0edd340383ba184c1a94) method to be notified of changes to the size of the Ad's bounding box.\n\nSummary\n-------\n\n| ### Constructors and Destructors ||\n|---|---|\n| [~AdViewBoundingBoxListener](#classfirebase_1_1gma_1_1_ad_view_bounding_box_listener_1a31ab608c7c31900d753353bb8eb227a2)`()` ||\n\n| ### Public functions ||\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [OnBoundingBoxChanged](#classfirebase_1_1gma_1_1_ad_view_bounding_box_listener_1ad266ecfb7f0d8e1a9014264204a7a408)`(`[AdView](/admob/cpp/reference/class/firebase/gma/ad-view#classfirebase_1_1gma_1_1_ad_view)` *ad_view, `[BoundingBox](/admob/cpp/reference/struct/firebase/gma/bounding-box#structfirebase_1_1gma_1_1_bounding_box)` box)=0` | `virtual void` This method is called when the [AdView](/admob/cpp/reference/class/firebase/gma/ad-view#classfirebase_1_1gma_1_1_ad_view) object's bounding box changes. |\n\nPublic functions\n----------------\n\n### OnBoundingBoxChanged\n\n```c++\nvirtual void OnBoundingBoxChanged(\n AdView *ad_view,\n BoundingBox box\n)=0\n``` \nThis method is called when the [AdView](/admob/cpp/reference/class/firebase/gma/ad-view#classfirebase_1_1gma_1_1_ad_view) object's bounding box changes.\n\n\u003cbr /\u003e\n\n| Details ||\n|------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Parameters | |-----------|--------------------------------------| | `ad_view` | The view whose bounding box changed. | | `box` | The new bounding box. | |\n\n### \\~AdViewBoundingBoxListener\n\n```c++\nvirtual ~AdViewBoundingBoxListener()\n```"]]