Android AdMob SMART_横幅在横向模式下不工作

Android AdMob SMART_横幅在横向模式下不工作,android,Android,我正在android项目中使用SMART_横幅。它在纵向模式下工作正常,但当方向改变(横向)时,横幅宽度保持不变。 这是我的adview布局: <LinearLayout android:id="@+id/adLayout" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBot

我正在android项目中使用SMART_横幅。它在纵向模式下工作正常,但当方向改变(横向)时,横幅宽度保持不变。 这是我的adview布局:

<LinearLayout
        android:id="@+id/adLayout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:background="#000000"
        android:orientation="vertical" >

        <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"
            app.backgroundColor ="#000000"
            ads:adUnitId="xxxxxxx"
            android:gravity="center" >
        </com.google.android.gms.ads.AdView>
</LinearLayout>


我还尝试了
android:layout\u width=“wrap\u content”
用于包含横幅的LinearLayout,并尝试了
android:layout\u width=“match\u parent”
用于AdView-什么也没有发生。

检查maniefest中没有类似以下的行-

android:configChanges="keyboard|keyboardHidden|orientation|screenSize"

是,smart_banner在横向模式下不工作。所以改变它


ads:adSize=“BANNER”

如果在AdView加载一个或多个广告后更改应用程序的方向,则在更改方向时,它不会自动调整视图的大小

在这种情况下,您应该覆盖
onConfigurationChanged
以跟踪方向更改,并在方向更改时重新创建AdView。堆栈溢出问题似乎有一个例子,但我自己还没有尝试过

一般来说,SMART_BANNER在横向模式下的填充率似乎很低