Auto Hide does not work for BottomNavigationView

301 views Asked by At

I recently integrated the BottomNavigationView in a fragment. As per Google guidelines, it should auto hide on scrolls. But it does not!

I also can't scroll the mainlayout. So without the autohide feature, the bottom part of my mainlayout is neither visible nor touchable.

Below is my footer layout:

<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>

Is there a flag I need to set to enable AutoHide functionality?

0

There are 0 answers