我在将横幅广告添加到我的 Android 应用程序的此布局中时遇到问题。但是这个广告没有显示。ActivityMain.java 中的实现没有问题,因为当我添加其他布局时,横幅开始显示。
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:attribute="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".PlayerActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray_background"
android:orientation="vertical">
// facebook banner ad
<LinearLayout
android:id="@+id/banner_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:orientation="vertical"
/>
<developer.shivam.library.CrescentoContainer
android:id="@+id/crescentoContainer"
android:layout_width="match_parent"
android:layout_height="440dp"
android:elevation="20dp"
android:scaleType="centerCrop"
attribute:curvature="50dp">
<com.flaviofaria.kenburnsview.KenBurnsView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/wallpaper" />
<com.cleveroad.play_widget.PlayLayout
android:layout_marginTop="?attr/actionBarSize"
android:id="@+id/ivPhoto"
android:layout_width="260dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true" />
</developer.shivam.library.CrescentoContainer>
<include layout="@layout/song_info" />
</LinearLayout>
</android.support.design.widget.CoordinatorLayout>Run Code Online (Sandbox Code Playgroud)