Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/203.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 框架布局重叠底部导航视图_Android_Android Layout - Fatal编程技术网

Android 框架布局重叠底部导航视图

Android 框架布局重叠底部导航视图,android,android-layout,Android,Android Layout,我的应用程序由顶部的AppBarLayout、中部的FrameLayout和底部的BottomNavigationView组成。起初,FrameLayout与AppBarLayout和BottomNavigationView重叠。我设法将AppBarLayout和FrameLayout分开,但似乎无法将BottomNavigationView分开 <android.support.design.widget.CoordinatorLayout xmlns:app="http://schem

我的应用程序由顶部的AppBarLayout、中部的FrameLayout和底部的BottomNavigationView组成。起初,FrameLayout与AppBarLayout和BottomNavigationView重叠。我设法将AppBarLayout和FrameLayout分开,但似乎无法将BottomNavigationView分开

<android.support.design.widget.CoordinatorLayout xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.jy.hi.Splash"
android:background="@color/whiteBG">

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">
    <android.support.design.widget.AppBarLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <android.support.v7.widget.Toolbar
            android:id="@+id/toolbarTop"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <TextView
                android:id="@+id/toolbar_title"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:gravity="center"
                android:text="hi"
                android:textColor="@color/talecolor"
                android:textSize="22sp" />

        </android.support.v7.widget.Toolbar>
    </android.support.design.widget.AppBarLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="horizontal">
        <FrameLayout
            android:id="@+id/frame"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

        </FrameLayout>

    </LinearLayout>

</LinearLayout>

<!--bottom-->
<RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="55dp"
    android:id="@+id/bottomBar"
    android:layout_gravity="bottom">

    <com.ittianyu.bottomnavigationviewex.BottomNavigationViewEx
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:id="@+id/bottomNavView_Bar"
        android:background="@drawable/white_grey_border_top"
        app:menu="@menu/bottom_navigation_menu"
        app:itemIconTint="@color/bottom_nav_icon_color_selector"
        app:itemTextColor="@color/bottom_nav_icon_color_selector">

    </com.ittianyu.bottomnavigationviewex.BottomNavigationViewEx>
</RelativeLayout>


线性布局高度设置为
match\u parent

将其更改为
wrap\u content

(...)
<LinearLayout
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:orientation="vertical">
<android.support.design.widget.AppBarLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content">
(...)
(…)
(...)