智能横幅广告
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
作为一种广告单元,智能横幅可在任何屏幕尺寸、任何屏幕方向的各种设备上展示与屏幕等宽的横幅广告。智能横幅广告可以检测设备处于当前屏幕方向时的宽度,并据此创建与之等宽的广告视图。
智能横幅可实现三种广告高度:
广告高度 |
屏幕高度 |
32 dp |
≤ 400 dp |
50 dp |
> 400 dp 且 ≤ 720 dp |
90 dp |
> 720 dp |
通常情况下,在手机上,当屏幕为纵向时,智能横幅广告高度为 50dp;当屏幕为横向时,广告高度为 32dp。在平板电脑上,不论屏幕方向为纵向还是横向,横幅高度通常均为 90dp。
当图片广告不足以占据所分配的整个空间时,系统会居中放置图片,然后填充两侧剩余的空间。
如需使用智能横幅广告,请在创建 BannerView
时为广告尺寸指定 AdSize.SmartBanner
。例如:
// Create a Smart Banner at the top of the screen.
BannerView bannerView = new BannerView(adUnitId, AdSize.SmartBanner, AdPosition.Top);
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-11-24。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2024-11-24。"],[[["Smart Banners are responsive ad units that adjust their size to fit the width of the device screen across various devices and orientations."],["They utilize three ad heights (32 dp, 50 dp, 90 dp) based on the screen height to ensure optimal display."],["On phones, Smart Banners typically have a height of 50 dp in portrait and 32 dp in landscape, while on tablets, they are usually 90 dp in both orientations."],["When using Smart Banners, developers need to specify `AdSize.SmartBanner` when creating a `BannerView`."],["Consider using adaptive banners as a newer alternative for enhanced ad experiences."]]],[]]