lomza lomza - 1 month ago 22
Android Question

Hiding the scroll bar in WebView

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 related to customization of the scroll bar programmatically. Thanks!

Answer

setScrollbarFadingEnabled() method does exactly what you want. It hides scrollbar when the view isn't scrolling.

webView.setScrollbarFadingEnabled(true);