如何在 webview 片段中自动隐藏工具栏

How to auto hide toolbar in webview fragments

我正在尝试在 webview 中向下滚动内容时自动隐藏工具栏。为此我已经尝试过 NestedScrollView,但是它会导致 webview 中的高度问题,并且 google 不建议在 webivew 中使用 NestedScrollView。我也不能使用 Android-ObservableScrollView 因为我已经在 webview 中使用了一些自定义库。

请帮帮我。

谢谢!

终于想通了!!!

遵循第二个答案,它成功了。