1
由於我在橫幅廣告應用程序中遷移到Google play服務,因此即使未加載廣告,也會始終佔用空白區域。AdMob - 未加載admob橫幅時出現空白
我不希望橫幅未加載時佔用空格。
我的XML代碼:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/background"
android:orientation="vertical"
tools:context=".MainActivity" >
<GridView
android:id="@+id/icon_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:numColumns="4" />
<com.google.android.gms.ads.AdView
android:id="@+id/adView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
ads:adSize="SMART_BANNER"
ads:adUnitId="ca-app-pub-ABC/ABC" />
</RelativeLayout>