更新时间:2023-11-18 23:48:22
RelativeLayout 的左右填充占用了 AdView 所需的空间.
The left and right padding of your RelativeLayout is consuming space required by your AdView.
将RelativeLayout 配置更改为:
Change RelativeLayout config to :
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
...
android:paddingLeft="0dp"
android:paddingRight="0dp"
...
>
您可能还想将 AdView 配置更改为:
You probably also want to change your AdView config to:
<com.google.ads.AdView
android:id="@+id/adMobadView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
...
/>
因为您真的不希望 AdView 占用整个屏幕.
as you don't really want your AdView to consume the entire screen.