在使用BottomNavigationView作为底部导航时导航栏一直浮在展示Fragment的FrameLayout底部上层,想要的效果是Fragment和BottomNavigationView垂直排列
原布局代码
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="?attr/actionBarSize">
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/nav_view"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="0dp"
android:layout_marginEnd

博客主要围绕使用BottomNavigationView作为底部导航时的布局问题展开。当前导航栏浮在展示Fragment的FrameLayout底部上层,期望实现Fragment和BottomNavigationView垂直排列,并给出原布局代码及修改方向,如将fragment高度修改、改为相对布局。
最低0.47元/天 解锁文章
3373

被折叠的 条评论
为什么被折叠?



