Хорошо, я знаю, что это дубликат, но ни одно решение, которое я нашел, не сработало.Я не знаю, в чем проблема и почему она не работает.Я хотел бы, чтобы BottomNavigationView скрывался при прокрутке gridv вниз и отображался при прокрутке вверх.Может ли кто-нибудь помочь?
<RelativeLayout 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=".layout.HomeActivity">
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent">
<GridView
android:id="@+id/gridLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:numColumns="2"
android:scrollbars="none" />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
<com.google.android.material.bottomnavigation.BottomNavigationView
android:layout_alignParentBottom="true"
app:layout_behavior="@string/hide_bottom_view_on_scroll_behavior"
android:id="@+id/bottom_menu"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:itemIconTint="@drawable/clicl_menu"
app:itemTextColor="@drawable/clicl_menu"
app:menu="@menu/bottom_menu"/>
</RelativeLayout>