My layout file defines a WebView, underneath which there are some fixed height buttons.
Another workaround for this problem could be in javascript usage. So when your webpage is loaded you can do such js call to set paddings:
webView.setWebViewClient(new WebViewClient() {
@Override
public void onPageFinished(WebView view, String url) {
webView.loadUrl("javascript:document.body.style.margin=\"8%\"; void 0");
}
});