这是我的布局文件。由于某种原因,我的广告没有显示在页面末尾,而是显示在远程图片的正下方。
如何使我的广告展示在页面末尾,而不是恰好在图片下方?我究竟做错了什么?我真的不知道如何解决此问题。.
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:background="@drawable/remotes_bg"
tools:openDrawer="start">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ScrollView
android:id="@+id/scroll"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:paddingBottom="0dp"
android:paddingLeft="20dp"
android:paddingRight="20dp"
android:paddingTop="20dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
<ImageView
android:id="@+id/remoteImage"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:adjustViewBounds="true"
android:clickable="true"
android:contentDescription="@string/remote_image_description"
android:focusable="true"
android:scaleType="fitXY" />
<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
</LinearLayout>
</ScrollView>
<com.ncorti.slidetoact.SlideToActView
android:id="@+id/slider"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center"
android:gravity="center_horizontal"
app:text="@string/remote_is_working_slider" />
</FrameLayout>
<com.google.android.gms.ads.AdView xmlns:ads="http://schemas.android.com/apk/res-auto"
android:id="@+id/adView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
ads:adSize="SMART_BANNER"
ads:adUnitId="@string/ad_unit_id_main_activity"></com.google.android.gms.ads.AdView>
</LinearLayout>
<include
layout="@layout/app_bar_remote"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<android.support.design.widget.NavigationView
android:id="@+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:fitsSystemWindows="true"
app:headerLayout="@layout/nav_header_remote"
app:menu="@menu/activity_remote_drawer" >
</android.support.design.widget.NavigationView>
</android.support.v4.widget.DrawerLayout>