我有一个布局,其中有一个网格视图,我想在屏幕底部显示横幅广告我有以下代码
<?xml version="1.0" encoding="utf-8"?>
<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:background="@color/backgroundColor"
android:fitsSystemWindows="true">
<include layout="@layout/detail_activity_bar"></include>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<GridView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/home_grid"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:horizontalSpacing="5dp"
android:verticalSpacing="5dp"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_marginTop="5dp"
android:layout_marginBottom="60dp"
android:numColumns="2"
android:stretchMode="columnWidth"/>
<com.google.android.gms.ads.AdView
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:id="@+id/adViewGallery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
android:layout_marginBottom="5dp"
android:layout_gravity="bottom|center"
ads:adSize="SMART_BANNER"
ads:adUnitId="@string/home_banner">
</com.google.android.gms.ads.AdView>
</FrameLayout>
</android.support.design.widget.CoordinatorLayout>
它适用于 4 英寸移动设备,但在更大的设备上,横幅广告会与网格内容重叠。如何使其适用于所有设备,使其不与应用内容重叠