2017-03-03 18 views
2

내 BottomNavigationView의 고도가 워킹되지 않습니다. 다른 모든 UI 구성 요소가 특정 고도를 갖지만 BottomNavigationView는 가져옵니다.고도가 BottomNavigationView에서 작동하지 않습니다.

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:tools="http://schemas.android.com/tools" 
    xmlns:app="http://schemas.android.com/apk/res-auto" 
    android:id="@+id/activity_main" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent"> 
    <FrameLayout 
     android:id="@+id/main_container" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:layout_above="@+id/bottom_navigation" 
     android:layout_alignParentTop="true"> 
    </FrameLayout> 

    <android.support.design.widget.BottomNavigationView 
     android:elevation="8dp" 
     android:id="@+id/bottom_navigation" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     app:itemBackground="@color/white" 
     app:itemIconTint="@drawable/nav_item_color_state" 
     app:itemTextColor="@drawable/nav_item_color_state" 
     android:layout_alignParentBottom="true"/> 

</RelativeLayout> 

내가 무엇을 할 수 있습니다 : 여기

는 XML인가?

참고 : 색상이 투명하지 않습니다.

+0

BottomNavigationView에 'android : background' 속성을 추가하고 작동하는지 확인하십시오. –

+0

여전히 변경 사항이 없습니다. – Ale4303

+0

에 동일한 문제가 있습니다. 해결책을 찾았습니까? @ Ale4303 –

답변

1

당신은 Snackbar를 표시하려고하면 (뷰의 바닥에서), 당신은 android:elevation="8dp"이 적용되는 것을 볼 수 있습니다 네임 스페이스 xmlns:app="http://schemas.android.com/apk/res-auto"를 사용하고 아래로 렌더링하는 app:elevation = "8dp" 대신

0

android:elevation="8dp"의 그림자를 사용해야합니다, 당신은 원 그것을 볼 수 없어요.

BottomNavigationView 상단에 표시 할 그림자를 추가하려면 manually을 그려야합니다.