2017-10-16 1 views
0

내 앱은 상단에는 AppBarLayout, 중간에는 FrameLayout, 하단에는 BottomNavigationView로 구성됩니다. 처음에는 FrameLayout이 AppBarLayout 및 BottomNavigationView와 겹치기 시작했습니다. 나는 AppBarLayout과 FrameLayout을 분리 할 수 ​​있었지만 BottomNavigationView를 분리 할 수 ​​없었다.FrameLayout overlapping 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> 

답변

0

가있는 LinearLayout match_parent 높이로 설정된다. wrap_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"> 
(...) 

변경을