2
<LinearLayout
    orientation="vertical">
...
   <android.support.v7.widget.CardView
        android:id="@+id/card_pitch"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginLeft="8dp"
        android:layout_marginRight="8dp"
        card_view:cardCornerRadius="0dp">

        <com.google.android.gms.ads.NativeExpressAdView
            android:id="@+id/adview_small_light"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerHorizontal="true"
            android:visibility="gone"
            ads:adSize="FULL_WIDTHx100"
            ads:adUnitId="xxx">
        </com.google.android.gms.ads.NativeExpressAdView>

    </android.support.v7.widget.CardView>
1-11 16:21:22.211 28899-28899/? W/Ads: Not enough space to show ad. Needs 411x100 dp, but only has 379x385 dp.
11-11 16:21:22.211 28899-28899/? W/Ads: Not enough space to show ad. Needs 411x100 dp, but only has 379x100 dp.
11-11 16:21:22.211 28899-28899/? W/Ads: Not enough space to show ad. Needs 411x100 dp, but only has 379x173 dp.
11-11 16:21:22.211 28899-28899/? W/Ads: Not enough space to show ad. Needs 411x100 dp, but only has 379x100 dp.

広告が表示されません。CardView の余白に FULL_WIDTH の問題があります。これを行う方法はありますか?FULL_WIDTH を使用し、CardView にマージンを加えて追加を表示します。同じ問題で、CardView のマージンではなく、親 LinearLayout にパディングとマージンを配置しようとしました。

4

1 に答える 1