Home » Java » java – WebView not showing all parts of a website-Exceptionshub

java – WebView not showing all parts of a website-Exceptionshub

Posted by: admin February 25, 2020 Leave a comment

Questions:

I am trying to set up a small kiosk app for a car rental company of a friend.
I am using the following code to access the website they have online:

        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.activity_main);
        myWebView = (WebView) findViewById(R.id.webView);
        myWebView.setWebChromeClient(new WebChromeClient());
        WebSettings webSettings = myWebView.getSettings();
        webSettings.setJavaScriptEnabled(true);
        webSettings.setLoadWithOverviewMode(true);
        webSettings.setUseWideViewPort(true);
        myWebView.loadUrl("WEBSITE");
        myWebView.setWebViewClient(new WebViewClient());

It all shows up fine while using Chrome, but some parts of the website aren’t visible when using the app.
I have forcing the chrome client, as you can see, but that did not help.
I would gladly accept any criticism.

How to&Answers: