智能横幅广告
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
智能横幅广告是一种广告单元,可在任何屏幕上呈现与屏幕等宽的横幅广告
以任意屏幕方向呈现广告的尺寸智能横幅可检测
设备当前屏幕方向的宽度,并创建该尺寸的广告视图。
智能横幅广告支持三种广告高度:
广告高度 |
屏幕高度 |
32 dp |
≤ 400 dp |
50 dp |
>400 dp 且 ≤ 720 dp |
90 dp |
>720 dp |
通常情况下,在手机上,智能横幅在纵向模式下的高度为 50 dp,高度为 32 dp
横向模式。在平板电脑上,两种屏幕方向的高度通常均为 90 dp。
当图片广告不足以占据分配的整个空间时,
图片将居中放置,并填充两侧的空白区域。
要使用智能横幅广告,请在广告展示时为广告尺寸指定 AdSize.SmartBanner
创建 BannerView
。例如:
// 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-09-11。
[[["易于理解","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-09-11。"],[[["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."]]],[]]