【发布时间】:2023-03-17 19:41:01
【问题描述】:
我的 BottomNavigationView 上的海拔没有工作,当我启动我的应用程序时,所有其他 UI 组件都获得了它们的特定海拔,但 BottomNavigationView。
这是 XML:
<?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>
我能做什么?
注意:没有颜色是透明的。
【问题讨论】:
-
将
android:background属性添加到BottomNavigationView,看看是否有效 -
还是没有变化
-
有同样的问题。你找到解决方案了吗? @Ale4303
-
不,还没有。还在寻找:(
标签: android android-elevation bottomnavigationview