java - 我怎样才能堆叠这些横幅
问题描述
我怎样才能堆叠这些横幅。你能帮我解决这个问题吗?
和横幅代码是否正确?当我添加另一个banner时,直接复制粘贴就够了吗?
代码...
<com.google.android.gms.ads.AdView
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
ads:adSize="BANNER"
ads:adUnitId="ca-app-pub-3940256099942544/6300978111"
android:layout_gravity="bottom">
</com.google.android.gms.ads.AdView>
<com.google.android.gms.ads.AdView
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
ads:adSize="BANNER"
ads:adUnitId="ca-app-pub-3940256099942544/6300978111">
</com.google.android.gms.ads.AdView>
解决方案
我们没有太多关于代码结构的信息,但通常,要垂直堆叠项目,您需要使用LinearLayout
推荐阅读
- java - 如何像邮递员提供的保存和下载方式一样放心地保存和下载文件
- javascript - 在 render 方法中如何默认调用函数?
- typescript - 使用 console.log 正确键入 apply 方法?
- openssl - OpenSSL 标准化 CSR 配置文件的属性在哪里?
- javascript - setState 延迟更新组件一个状态
- scala - 将外部 json 文件读入 RDD 并在 scala 中提取特定值
- php - 以表格形式显示取自 ENUM 的当前值
- reactjs - onChange 函数不应影响 json 中具有相同名称的其他状态
- html - 图像和视频响应不工作
- android - Android - 如何从 Room 数据库访问数据到 Stack Widget