创建新广告单元时 Android 中的智能横幅类型 select

Which type to select for Smart Banner in Android when creating a new ad unit

我在 AdMob 中注册并尝试创建一个新的广告单元。只给我两个选择:横幅广告或插页式广告。我想知道如何为适合横向的智能横幅创建广告单元?

创建广告单元时需要select横幅。在您的代码中将其用于智能横幅:

AdView adView = new AdView(this);
adView.setAdSize(AdSize.SMART_BANNER);

A​​dView 会自动处理方向更改,智能横幅会重新调整以适应纵向屏幕。这就是智能横幅的全部目的。

Smart Banners are new ad units (as of v6.0.0) that will render screen-wide banner ads on any screen size across different devices in either orientation. Smart Banners help deal with increasing screen fragmentation across different devices by "smartly" detecting the width of the phone in its current orientation, and making the ad view that size.

来源:Link