【发布时间】:2018-06-21 21:38:32
【问题描述】:
这是我在 XML 中的底部导航栏的样子:
<android.support.design.widget.BottomNavigationView
android:id="@+id/bottom_nav"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="@android:color/white"
app:itemBackground="@color/primary"
app:elevation="8dp"
app:menu="@menu/main_activity_bottom_nav"/>
如果我删除app:itemBackground="@color/primary",海拔会正确显示,但当我重新添加它时,它就会消失。
【问题讨论】:
-
也许this post 会有所帮助。
-
我遇到了,如果您看到我的代码,我实际上将背景设置为白色
标签: android android-support-library bottomnavigationview