Java 打开幻灯片菜单时隐藏底部导航视图
在我的项目中,我有一个Java 打开幻灯片菜单时隐藏底部导航视图,java,android-studio,bottomnavigationview,Java,Android Studio,Bottomnavigationview,在我的项目中,我有一个底部导航视图,其中包含2个片段,每个片段都有一个幻灯片菜单(导航视图),当我的任何菜单显示时,我想隐藏底部导航视图,有人能给我举个例子吗?如果有类似的问题,如果您能给我看一下,我会很高兴,因为如果您的布局是这样的,我还没有发现类似的内容: <?xml version="1.0" encoding="utf-8"?> <androidx.drawerlayout.widget.DrawerLayout xmlns:an
底部导航视图
,其中包含2个片段
,每个片段都有一个幻灯片菜单
(导航视图
),当我的任何菜单显示时,我想隐藏底部导航视图
,有人能给我举个例子吗?如果有类似的问题,如果您能给我看一下,我会很高兴,因为如果您的布局是这样的,我还没有发现类似的内容:
<?xml version="1.0" encoding="utf-8"?>
<androidx.drawerlayout.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:id="@+id/drawer_layout"
tools:openDrawer="start"
android:layout_height="match_parent"
tools:context=".MainActivity">
<RelativeLayout
android:layout_width="match_parent"
android:layout_alignParentBottom="true"
android:layout_height="?attr/actionBarSize">
<com.google.android.material.bottomnavigation.BottomNavigationView
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:menu="@menu/buttom_nav_menu"/>
</RelativeLayout>
<com.google.android.material.navigation.NavigationView
android:layout_gravity="start"
app:menu="@menu/menu"
android:layout_width="330dp"
android:layout_height="match_parent"/>
</androidx.drawerlayout.widget.DrawerLayout>
您不需要隐藏底部导航视图
,因为幻灯片菜单在它前面您可能需要阅读。我不清楚你的问题,但你可以回答它并添加一个,这肯定会有帮助。这里的示例请求与主题无关。