Visual error in WebView

0

To use a webview to expose my site, however on the sides it is with two white bars as in the photo.

Code:

@OverrideprotectedvoidonCreate(BundlesavedInstanceState){super.onCreate(savedInstanceState);setContentView(R.layout.activity_principal);WebViewwebView=(WebView)findViewById(R.id.web);webView.loadUrl("https://www.meudominio.com/");

    WebSettings ws = webView.getSettings();
    ws.setAllowFileAccess(true);
    ws.setCacheMode(WebSettings.LOAD_DEFAULT);
    ws.setJavaScriptEnabled(true);
    ws.setAppCacheMaxSize(5 * 1024 * 1024); //5mb
    ws.setSupportZoom(false);
    ws.setAppCacheEnabled(true);

    ws.setLoadsImagesAutomatically(true);
    ws.setAppCacheEnabled(true);
    ws.setDatabaseEnabled(true);
    ws.setDomStorageEnabled(true);
    ws.setJavaScriptCanOpenWindowsAutomatically(true);


}
    
asked by anonymous 03.04.2018 / 00:22

1 answer

1

I was able to resolve personal, just add the wideviewport as true:

 WebSettings ws = webView.getSettings();
        ws.setUseWideViewPort(true);'
    
03.04.2018 / 02:26