Remove Unwanted White Space in Webview Android

Remove White Space in WebView

I think it's scrollBar;

<WebView android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="none"
android:id="@+id/mainWebView">
</WebView>

mainWebView.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);

to

mainWebView.setScrollBarStyle(View.SCROLLBARS_OUTSIDE_OVERLAY);

Unwanted Top and Bottom White Space in Android Webview after keyboard disappears

Thanks for the Playground Manoj.
It looks like there was percentage height and width in html page and everytime user moves out from html page it re adjusts itself to available space and sometimes squeezes as well.

I was using the webview inside the GridLayout and setting the height and width 100% to that GridLayout solved my problem.



Related Topics



Leave a reply



Submit