webview と admob を使用したレイアウトがあります。また、デバイスの回転時にページ コンテンツをリロードしないように、onConfigChanges を処理するために、orientation|keyboard をメイン アクティビティに設定します。アプリが起動すると、webview が作成されてコンテンツが読み込まれ、admob が表示されますが、webview のサイズは自動変更されません! 発生したら、デバイスを横向きにして縦向きに戻すと、レイアウトのサイズが変更され、適切に収まります! webview の自動サイズ変更を強制するにはどうすればよいですか? いくつかのオプションを試しましたが、成功しませんでした! ありがとうございました
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<com.google.ads.AdView android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
ads:adUnitId="xxx"
ads:adSize="SMART_BANNER"
ads:testDevices="TEST_EMULATOR, xxx"
ads:loadAdOnCreate="true"/>
<RelativeLayout
android:id="@+id/bLayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="@+id/barraSocial">
<WebView
android:id="@+id/webviewB"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:autoLink="web"
android:textColor="@android:color/black"
android:scrollbars="none"
/>
</RelativeLayout>