Android Question Want to Hide Scroll Bars in WebView

Johnson Samuel

Licensed User

Dim no As JavaObject = WebView
no.GetFieldjo("scrollView").SetField("showsHorizontalScrollIndicator", False)
no.GetFieldjo("scrollView").SetField("showsVerticalScrollIndicator", False)


error message:
java.lang.RuntimeException: Field: scrollView not found in: android.webkit.WebView

I want to hide both horizontal and vertical scroll bars.
Can any expert help?

Eme Fibonacci

Well-Known Member
Licensed User
Sub setScrollBarEnabled(v As View, vertical As Boolean, horizontal As Boolean)
    Dim jo = v As JavaObject
    jo.RunMethod("setVerticalScrollBarEnabled", Array As Object (vertical))
    jo.RunMethod("setHorizontalScrollBarEnabled", Array As Object (horizontal))
End Sub
Upvote 0