所以通過support V25
。我們有一個名爲Bottom navigation的新組件。如何將仰角設置爲底部導航
按照設計準則,底部導航的elevation
應該8dp
(https://material.io/guidelines/components/bottom-navigation.html#bottom-navigation-specs)
但我不能設置elevation
它。
任何建議,例如將不勝感激。謝謝!
更新XML代碼
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.BottomNavigationView
android:id="@+id/bottom_navigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:elevation="8dp"
app:elevation="8dp"
app:itemBackground="@color/colorPrimary"
app:itemIconTint="@drawable/bottom_nav_color_state"
app:itemTextColor="@drawable/bottom_nav_color_state"
app:menu="@menu/bottom_navigation_main"/>
<FrameLayout
android:id="@+id/contentFrame"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/bottom_navigation"
android:background="#EDEDED"/>
張貼含有底部導航你的XML代碼。 –
check [this](https://code.google.com/p/android/issues/detail?id=226182&sort=-id%20-stars%20-status&colspec=ID%20Status%20Priority%20Owner%20Summary%20Stars %20Reporter%20Opened)和[this](http://stackoverflow.com/questions/40316411/bottomnavigationview-shadow-and-ripple-effect) –
試試這個方法:http://stackoverflow.com/questions/41650778/android -bottom-navigation-bar-with-drop-shadow/41651284#41651284 –