Android 内容放在底部导航抽屉后面

Android 内容放在底部导航抽屉后面,android,android-layout,Android,Android Layout,我在底部导航抽屉工作,这是应用程序的底部,我也添加了scrollView,但我的内容在底部导航后面,为什么? 如何修复它 <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:

我在底部导航抽屉工作,这是应用程序的底部,我也添加了scrollView,但我的内容在底部导航后面,为什么? 如何修复它

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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/container"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".AdminHome">


    <android.support.design.widget.BottomNavigationView
        android:id="@+id/navigation"
        app:itemBackground="@color/colorPrimary"
        android:layout_width="match_parent"
        android:layout_height="56dp"
        android:layout_marginStart="0dp"
        android:layout_marginEnd="0dp"
        app:itemIconTint="@color/nav_item_color"
        app:itemTextColor="@color/nav_item_color"
        android:background="?android:attr/windowBackground"
        android:layout_alignParentBottom="true"
        app:menu="@menu/navigation" />

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="100dp"
        android:id="@+id/header"
        android:background="@color/colorPrimary">


        <ImageView
            android:layout_width="220px"
            android:layout_height="220px"
            android:id="@+id/profilePic"
            android:layout_margin="5dp"
            android:src="@mipmap/ic_launcher_round"/>


    </RelativeLayout>



    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@id/line"
        android:layout_above="@+id/navigation"
        android:layout_margin="10dp">




    </ScrollView>

</RelativeLayout>


由于代码太长,我缩短了我的代码并给出了概念。

下面的
行是什么:

<ScrollView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@id/line"
        android:layout_above="@+id/navigation"
        android:layout_margin="10dp">

我认为你必须这样设置:

<ScrollView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@id/header"
            android:layout_above="@+id/navigation"
            android:layout_margin="10dp">

下面的
行是什么:

<ScrollView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@id/line"
        android:layout_above="@+id/navigation"
        android:layout_margin="10dp">

我认为你必须这样设置:

<ScrollView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@id/header"
            android:layout_above="@+id/navigation"
            android:layout_margin="10dp">


try by add margin bottom 56dptry by add margin bottom 56dp该行实际上是您定义的页眉的id,但它不起作用您确定吗?因为我在一个模拟器中测试了你的布局,它工作正常。我在标题下面画了一条线,这就是为什么它的布局在下面,但内容在导航后面,我在滚动视图中绘制线性布局,有很多内容,但当我滚动最后一个内容落后时,请检查此项并指导我如何在我的情况下工作。该行实际上是你定义的标题id,但它不起作用。你确定吗?因为我在一个模拟器中测试了你的布局,它工作正常。我在标题下面画了一条线,这就是为什么它的布局在下面,但内容在导航后面,我在滚动视图中绘制线性布局,有很多内容,但当我滚动最后一个内容时,请检查并指导我如何在我的情况下工作