Hiding the scroll bar in WebView

后端 未结 8 1475
栀梦
栀梦 2020-12-03 07:05

I want to hide a vertical scroll bar in my WebView when I do not scroll the page. As for now, it is displayed always. I create a WebView programmatically, so my question is

相关标签:
8条回答
  • 2020-12-03 07:51

    Similar to other answers but to get a scrollbar that behaves like the one in ListView, this is the code:

    webView.setScrollbarFadingEnabled(true); // Explicitly, however it's a default, I think.
    webView.setScrollBarStyle(WebView.SCROLLBARS_INSIDE_OVERLAY);
    
    0 讨论(0)
  • 2020-12-03 07:56

    This is what you are after:

    mWebView.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);
    
    0 讨论(0)
提交回复
热议问题