0

I am trying to load a URL in webview, but it just loads a blank page.

Upon inspecting the webview in Chrome, I got to know that the actual size (1080 x 1080) and rendered size (320 x 0) are different.

enter image description here

Due to the 0 rendered height, I am unable to see anything on the webview.

Can someone please guide me through this? Am I missing something in setting my webview correctly? Here is my webview configuration:

  webView.settings.javaScriptEnabled = true
  webView.settings.loadWithOverviewMode = true
  webView.settings.useWideViewPort = true
  webView.settings.layoutAlgorithm = WebSettings.LayoutAlgorithm.SINGLE_COLUMN
  webView.settings.mixedContentMode = WebSettings.MIXED_CONTENT_ALWAYS_ALLOW
  webView.settings.domStorageEnabled = true
  webView.settings.allowFileAccessFromFileURLs = true
  webView.settings.allowUniversalAccessFromFileURLs = true
  webView.settings.loadsImagesAutomatically = true
  webView.scrollBarStyle = View.SCROLLBARS_INSIDE_OVERLAY
  webView.settings.builtInZoomControls = true
2
  • can you share the code where you load the image? Commented May 11, 2022 at 12:19
  • webView.loadUrl(url) Commented May 11, 2022 at 12:22

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.