带有底部导航视图的android webview问题:向上滚动时不显示底部导航视图

时间:2020-07-14 19:17:05

标签: android android-webview show-hide android-coordinatorlayout bottomnavigationview

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

0 个答案:

没有答案