Android WebView leaves space for scrollbar

In my WebView , I have some block elements that have a background color (other than white). However, the background color does not pass across the sky .. um, screen. Instead, it leaves a small white stripe to the right, where the scroll will go. Now I want the scroll bars to appear only when scrolling (and disappear after the user has finished scrolling). I tried:

 android:fadingEdge="vertical|horizontal" android:fadeScrollbars="true" android:scrollbarStyle="insideOverlay" (and all other options) 

In addition, my HTML contains the following in <head> :

 <meta name="viewport" content="target-densitydpi=device-dpi" /> 

Thus, it does not allow scaling and does not reduce the default scale.

However, I cannot figure out how to get rid of the white strip. Any ideas?

+61
android android-webview
Oct 22 2018-10-22
source share
2 answers

I grabbed this one. Found the answer here .

It looks like you were dead with android:scrollbarStyle="insideOverlay" , except that due to some error it does not work correctly if it is defined in XML. It works correctly if you use:

 webView.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY); 

annoying.

+116
Jan 10 '11 at 2:30
source share
 public void setVerticalScrollbarOverlay (boolean overlay) 

C: API Level 1
Indicate if the vertical scrollbar has an overlay style.
Image options overlay TRUE if the vertical scroll bar should have an overlay style.

+2
Jan 25 '11 at 8:30
source share



All Articles