Issue
I built a browser with webview and it is still in development. After adding a webview to the activity, I just simply went through the "webview client" sort of things, then I used loadURL("http://www.google.com")
(I didn't change any default attribute except the constraints), but the appearance of the page just looked strange.
But Google says webview uses the same engine as chrome. I wonder if I should enable something or this is how webview render HTML pages.
This is how it looks:
Solution
Some factors may cause this behavior, one is the version of the API that is running its WebView check the version of the API. But some settings can help resolve this behavior such as:
myWebView.webViewClient = WebViewClient()
myWebView.settings.setAppCacheEnabled (true)
myWebView.settings.javaScriptEnabled = true
myWebView.settings.loadWithOverviewMode = true
myWebView.settings.allowFileAccess = true
myWebView.settings.allowContentAccess = true
Answered By - Gabriel Marcos
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.