Android AdMob Adview重叠表格行按钮标题

Android AdMob Adview重叠表格行按钮标题,android,xml,layout,admob,android-scrollview,Android,Xml,Layout,Admob,Android Scrollview,我一直在使用以下布局开发一个类似音板的应用程序 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" xmlns:ads="http://schemas.android.com/apk/res-auto"

我一直在使用以下布局开发一个类似音板的应用程序

 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        xmlns:ads="http://schemas.android.com/apk/res-auto"
        xmlns:app="http://schemas.android.com/tools">
        <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
            xmlns:app="http://schemas.android.com/apk/res-auto"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_above="@+id/adView">
            <android.support.design.widget.AppBarLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                >
                    <android.support.v7.widget.Toolbar
                        android:id="@+id/toolbar"
                        android:layout_width="match_parent"
                        android:layout_height="?attr/actionBarSize"
                        android:background="?attr/colorPrimary"
                        android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
                        app:layout_scrollFlags="scroll|exitUntilCollapsed"
                        app:titleTextAppearance="@style/Toolbar.TitleText"
                        app:layout_collapseMode="pin"/>
            </android.support.design.widget.AppBarLayout>

            <android.support.v4.widget.NestedScrollView
                xmlns:android="http://schemas.android.com/apk/res/android"
                xmlns:ads="http://schemas.android.com/apk/res-auto"
                android:layout_width="fill_parent"
                android:layout_height="match_parent"
                app:layout_behavior="@string/appbar_scrolling_view_behavior"
                >
    <TableLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:stretchColumns="0,1">
    <TableRow...>
    <TableRow...>
    <TableRow...>
    <TableRow...>
    <TableRow...>
    ....(some more rows, all of them with two buttons in each one)

     </TableLayout>
    </android.support.v4.widget.NestedScrollView>

    </android.support.design.widget.CoordinatorLayout>
        <com.google.android.gms.ads.AdView
            android:id="@+id/adView"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:layout_centerHorizontal="true"
            ads:adSize="BANNER"
            ads:adUnitId="@string/banner_ad_unit_id">
        </com.google.android.gms.ads.AdView>
    </RelativeLayout>
我遇到的问题是,当应用程序第一次启动时,当加载广告横幅时,如果我决定滚动到底部,一旦显示广告,它就会与最后两个按钮的标题重叠。但是一旦广告被刷新(30秒是刷新的实际时间),或者我按下“后退”按钮并重新进入应用程序,不知何故,缺少的标题不再被横幅覆盖

见所附图片。我想知道我是否可以从布局或代码中更改某些内容,以避免在首次加载应用程序时出现此问题


表格布局中添加一个50像素的底部边距,并为横幅留出空间,以避免显示不一致

 <TableLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="50dp"
        android:layout_gravity="center_horizontal"
        android:stretchColumns="0,1">


对不起,我不明白你说的“为横幅留出空间”是什么意思。我增加了底边,但还是遇到了同样的问题。我想我还有别的事要做,但我不知道是什么。给bannerOk留点空间,我明白你的意思,但我不知道怎么做。这是我可以在xml布局中做的,或者是在java代码中做的?是的,在xml中。更改表格布局,如我的答案所示。添加版面边距…我已将marginBottom属性添加到TableLayout中,但我仍然存在相同的问题,这就是为什么我认为缺少了其他内容,因为仅添加并不能解决问题。
 <TableLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="50dp"
        android:layout_gravity="center_horizontal"
        android:stretchColumns="0,1">