My Android app has a main WebView (HTML loaded from a local resource) which I want to use the entire width of the screen and be able to make (vertically) scrollable. So I've wrapped the WebView in a ScrollView in my layout XML, but no matter what I do I can't seem to be able to remove the scroll bar track from the right side of the scroll view. Even worse, I can't seem to be able to change the background colour of the scroll bar track.
The track takes up about 10dp's or so, which is creating problems for the HTML in the WebView. I'd like the scroll bar to appear on top of the web view (iPhone style, if you know what I mean). Now, you could say "why don't you change your HTML to be 10px thinner?", which is my fallback solution, but I'd much rather not have to.
Here's the relevant snippet of layout XML, you'll see I've tried every android:etc attribute I could find:
I'm a little confused why you are putting a
WebView into a
ScrollView in the first place. A
WebView has it's own built-in scrolling system.
Regarding your actual question, if you want the
Scrollbar to show up on top, you can use
view.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY) or android:scrollbarStyle="insideOverlay"