我在bing.com之类的网站上向下滚动时使用android webView实现了底部导航视图,底部导航视图完美地隐藏了,但向上滚动时却无法显示。
如何解决该问题?
我实现的代码
<androidx.coordinatorlayout.widget.CoordinatorLayout>
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/refresh_layout"
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
<FrameLayout
android:id="@+id/mainFrame"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
</FrameLayout>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
<com.google.android.material.bottomnavigation.BottomNavigationView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:background="@color/colorPrimaryDark"
app:menu="@menu/bottom_navigation"
app:labelVisibilityMode="unlabeled"
android:id="@+id/btm"
app:itemRippleColor="#f2f2f2"
app:itemIconTint="#f2f2f2"
app:layout_insetEdge="bottom"
app:layout_behavior="com.google.android.material.behavior.HideBottomViewOnScrollBehavior"
android:backgroundTint="@color/colorPrimaryDark" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>