У меня есть несколько полноэкранных действий в моем приложении, которые имеют нижнюю навигационную панель внизу. Если в приложении есть панель навигации, она выглядит нормально, например:

Когда я удаляю панель навигации, она выглядит как нижняя панель навигации заполняет свое место (вместо того, чтобы придерживаться нижней части макета):

Вот как это выглядит, когда я устанавливаю android:layout_height="55dp"
вместо "wrap_content"
:

Вот как я удаляю navigation bar
:
@Override
public void onResume(){
super.onResume();
View aView = getWindow().getDecorView();
aView.setSystemUiVisibility(
View.SYSTEM_UI_FLAG_LAYOUT_STABLE
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_FULLSCREEN
| View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
}
Это код моей деятельности XML:
<FrameLayout
android:id="@+id/main_activity_fragment_container"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1"
app:layout_constraintBottom_toTopOf="@+id/navigation"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
</FrameLayout>
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/navigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorPrimary"
android:backgroundTint="@color/colorPrimary"
app:itemIconTint="@color/bnv_colors_main_menu"
app:itemTextColor="@color/bnv_colors_main_menu"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:menu="@menu/navigation_main_menu"
app:labelVisibilityMode="labeled"
>
</com.google.android.material.bottomnavigation.BottomNavigationView>
В чем может быть проблема?