更新时间:2023-11-18 23:48:52
The left and right padding of your RelativeLayout is consuming space required by your AdView.
Change RelativeLayout config to :
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
...
android:paddingLeft="0dp"
android:paddingRight="0dp"
...
>
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"
...
/>
as you don't really want your AdView to consume the entire screen.