0
모든 활동에 대해 상위 아래에 내 admob 광고를 넣으려고합니다. 그러나 일부 경우에이 오류를 보여줍니다.표시 할 공간이 충분하지 않습니다. Admob 광고 경고
W/Ads(13240): Not enough space to show ad! Wants: <240, 37>, Has: <240, 0>
내 XML 코드는 다음과 같습니다
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
android:id="@+id/linear_layout_adv_container"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<com.google.ads.AdView
android:id="@+id/adView"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
ads:adSize="SMART_BANNER"
ads:adUnitId="a15xxxxxxa8088"
ads:loadAdOnCreate="true"
ads:testDevices="TEST_EMULATOR, TEST_DEVICE_ID" />
</RelativeLayout>
내가 놓친 거지 모르는 이유는 점점 :
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:orientation="vertical" >
<LinearLayout
style="@style/padding_title"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/ic_title" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="Tickets & Cards"
android:textColor="@color/white"
android:textSize="18.0sp"
android:textStyle="bold" />
</LinearLayout>
<ScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<More items here>
</ScrollView>
<include layout="@layout/ad_container" />
</LinearLayout>
그리고 ad_container.xml입니다 0 높이 대신에 필요한 높이. 누군가가 문제를 지적하기를 바랍니다. 감사합니다.
그래서 하단에 표시하려면 어떻게해야합니까? – user818455
wrap_content의 insted 인 37 픽셀로 설정하십시오. – g00dy