1

我最近将 BottomNavigationView 集成到一个片段中。根据谷歌指南,它应该自动隐藏在滚动条上。但事实并非如此!

我也无法滚动主布局。因此,如果没有自动隐藏功能,我的主布局的底部既不可见也不可触摸。

下面是我的页脚布局:

<FrameLayout 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:layout_height="match_parent"
    tools:context="com.app.ui.footer.FooterFragment">

    <android.support.design.widget.BottomNavigationView
        android:id="@+id/bottom_navigation"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        app:itemBackground="@color/grey"
        app:itemTextColor="@color/black" />

</FrameLayout>

我需要设置一个标志来启用自动隐藏功能吗?

4

0 回答 0