【问题标题】:Adding a Layout Container for the Android Banner Ad with FAN使用 FAN 为 Android 横幅广告添加布局容器
【发布时间】:2021-09-29 05:11:44
【问题描述】:

我正在尝试将 facebook 受众横幅广告添加到现有项目中,facebook 在 (https://developers.facebook.com/docs/audience-network/setting-up/ad-setup/android/banner/) 提供的文档显示此代码:

<LinearLayout
android:id="@+id/banner_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
/>

应该加到activity_main.xml,基本上我的项目没有那个布局文件。 我应该在哪里集成该代码?以便将横幅广告应用到整个应用屏幕上。

【问题讨论】:

  • 还是没有帮助!!

标签: android facebook android-studio android-layout ads


【解决方案1】:

此代码 sn-p 需要添加到您的布局 xml 中。如果您有多个布局/活动,则需要为所有布局/活动添加它,以便它在所有屏幕上可见

【讨论】:

  • 我看到一些 youtuber 只为 'activity_main.xml' 做这件事,而且出乎意料地适用于所有应用程序布局。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2022-08-14
  • 2012-05-30
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多