clear content : base layer doesn't match shown logcat for clearing webview contents in android - android-webview

When I using webview.clearview() to clear the webview contents that loaded previously, LogCat shows text as
"05-21 13:39:48.730: V/webcore(28508): clear content : base layer doesn't match"
and my webview loading the same content repeatedly.
Thanks in advance

The clearView() API is a bit weird. If you want the webview to not show any content just call:
webview.loadUrl("about:blank");

Related

Flutter webview is not showing image even thou it's so simple html

I am making a Flutter app, and I am using webview here.
It all goes fine but when it comes to image, it just fails.
Other text contents are all fine.
I tried several things but all failed.
You can replicate the test by this url
It appears fine from the browser but images never appaer only in flutter webview
This is my flutter code for the webview
I found the answer by myself. It was because the image source was referred as "http:". I just put the following tag and it solved like a charm

Can't open PDF file located in server in WebView on android device

I would like to open a PDF file that located in the server (Here)
in a specific place in my application.
I saw a couple of example how to do it with a webview, but no one works for me.
This is part of my code that should preview the pdf inside a WebView :
WebView webView = (WebView) findViewById(R.id.webView1);
webView.getSettings().setSaveFormData(true);
webView.getSettings().setJavaScriptEnabled(true);
webView.loadUrl("http://mes.mes-ltd.com/itay.pdf");
The solution is just a Blank webview.
Thanks for help!
You can't open a PDF directly in the WebView, it just doesn't support this. You'll need to do something like the solution outlined here.

YouTube-Video hidden by css not loading in MobileSafari

On a iPhone-Mobile-Webseite in a jQuery-Accordion there is a «Video»-Content-Box with a embeded YouTube-Video [iframe]. If I load this Page with the «Video»-Box 'open' the YouTube-Video is loading and displaing the Preview-Image perfectly … but if I load the Page with all Boxes closed (display: none … Accordion), MobileSafari will load the Box, but it is empty (but has the right height/height as it has with the displayed video.
On Desktop-Safari the Video will load no matter if the Box is visible or hidden (Accordion) … short: on MobileSafari the video only shows if the box is visible from the start … :-/
The problem was that I've used iframe to embed the video … therefore MobileSafari had a problem with the iframe.
If I use the object/embed-code (the 'old' YouTube-Embed-Code), the whole thing works perfectly.

iphone webview show html with images and css file

I found some interesting URL http://cubiq.org/rotating-wheel-for-your-iphone-webapps which has rotational menu. Its good. It has html file along with images, css files etc.
In iPhone app, I copied (to root folder) all the files and imported to project. I'm using UIWebView's load request to load the html. But I'm not getting the rotatable menu.
Can some one post me the code (or tutorial or prototype or example) on how to use it?
Also let me know how to catch the even on click on "OK" button at the middle of the html.
Thanks in advance.
checkout IUI : http://code.google.com/p/iui/

Updating UIWebView off screen?

I'm trying to get a UIImage of a UIWebView, I can do this fine using renderInContext:. However before I generate the image I would like to update the UIWebView with some HTML code, the trick is the UIWebView is hidden. Right now, I can not get the updated version of the web view to render in the UIImage, just the old one.
Are you waiting until the UIWebView re-renders before querying it again? Loading HTML into a UIWebView does not immediately update the view. You need to wait for webViewDidFinishLoad:. This is true even if the HTML is a simple string with no external references.