как сделать AdView показанным в нижней части страницы? - PullRequest
0 голосов
/ 05 марта 2019

это мой файл макета.По какой-то причине мое объявление не показывается в конце страницы, оно показывается прямо под удаленной картинкой.

как мне сделать так, чтобы мое объявление отображалось в конце страницы, а не точно подобраз?Что я делаю неправильно?Я действительно понятия не имею, как решить эту проблему ........

<?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>
...